Gitweb links:
...log
http://git.netsurf-browser.org/toolchains.git/shortlog/9077b37964481083fad09377e2d7cb391b3ba85c
...commit
http://git.netsurf-browser.org/toolchains.git/commit/9077b37964481083fad09377e2d7cb391b3ba85c
...tree
http://git.netsurf-browser.org/toolchains.git/tree/9077b37964481083fad09377e2d7cb391b3ba85c
The branch, master has been updated
via 9077b37964481083fad09377e2d7cb391b3ba85c (commit)
via f81a86505f13b5d2f3655547bec5ac0e1ca215c2 (commit)
via 6a0a02818b45d785a7da3fe8d7fdde6256b06597 (commit)
via da2a97fb030faa0f5c48b5c6e6ba21982dd8ff2b (commit)
via cd0deb266d6aa466033d8c75075d92aae5a83812 (commit)
via a7a391d352ba8554c4f6dfe49a18213842909e9a (commit)
from 671590abe5fe58e1d9524fdf0ce85ae18d6e0f62 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=9077b37964481083fad09377e2d7cb391b3ba85c
commit 9077b37964481083fad09377e2d7cb391b3ba85c
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
m68k-unknown-amigaos: use OpenSSL in lieu of a modern AmiSSL
Rework the logic here so it's less hard to switch between them.
diff --git a/sdk/Makefile b/sdk/Makefile
index b6bef03..da37722 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -109,6 +109,7 @@ SDK_ITEMS :=
COMMON_SDK_ITEMS := zlib.d openssl.d libpng.d libcares.d libcurl.d libexpat.d
+LIBCURL_SSL := openssl
LIBCURL_DISABLES := $(patsubst %,--disable-%,ftp file dict ldap ldaps mqtt
rtsp telnet gopher tftp pop3 imap smb smtp manual)
FREETYPE_ENV := LIBPNG_CFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config
--cflags) LIBPNG_LDFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config --ldflags)
@@ -157,11 +158,19 @@ endif
ifeq ($(TARGET),m68k-unknown-amigaos)
SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, roadshow.d libiconv.d libtre.d
libpbl.d $(COMMON_SDK_ITEMS) libjpeg.d)
EXTRAARGS_LIBCARES := --disable-shared --without-random
- EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random
--disable-threaded-resolver --with-amissl --with-zlib --disable-rt
--disable-ipv6
+ # XXX: reinstate amissl when there's v5 sdk?
+ #LIBCURL_SSL := amissl
+ EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random
--disable-threaded-resolver --with-zlib --disable-rt --disable-ipv6
LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024 -DRLIMIT_NOFILE=6"
LIBJPEG_ENV := LDFLAGS="-lm"
LIBJPEG_TURBO_ENV := LDFLAGS="-lm"
- LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API"
LIBS="-lm"
+ # XXX: build openssl against bsdsocket.library?
+ #OPENSSL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude"
CPPFLAGS="-D__NO_NET_API"
+ ifeq ($(LIBCURL_SSL),openssl)
+ LIBCURL_ENV := LIBS="-lm -lnet"
+ else
+ LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API"
LIBS="-lm"
+ endif
LIBEXPAT_ENV := LDFLAGS="-lm"
endif
@@ -384,8 +393,8 @@ $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz:
# OpenSSL
$(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d
$(BUILDSTEPS)/openssl-src.d
-ifneq ($(TARGET),m68k-unknown-amigaos)
- cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure
--prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads
$(EXTRAARGS_OPENSSL)
+ifeq ($(LIBCURL_SSL),openssl)
+ cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env)
$(OPENSSL_ENV) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared
no-threads $(EXTRAARGS_OPENSSL)
cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install
endif
touch $@
@@ -507,7 +516,7 @@ $(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz:
# libcurl
$(BUILDSTEPS)/libcurl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d
$(BUILDSTEPS)/openssl.d $(BUILDSTEPS)/libcares.d $(BUILDSTEPS)/libcurl-src.d
- cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS=""
$(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET)
--host=$(TARGET) --disable-shared --with-openssl --without-libidn2
${EXTRAARGS_LIBCURL}
+ cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS=""
$(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET)
--host=$(TARGET) --disable-shared --with-$(LIBCURL_SSL) --without-libidn2
${EXTRAARGS_LIBCURL}
cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) make install
touch $@
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=f81a86505f13b5d2f3655547bec5ac0e1ca215c2
commit f81a86505f13b5d2f3655547bec5ac0e1ca215c2
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
libcurl/m68k-unknown-amigaos: remove redefinition of __NO_NET_API
diff --git
a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
new file mode 100644
index 0000000..ba595ca
--- /dev/null
+++ b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
@@ -0,0 +1,10 @@
+--- lib/curl_setup.h.orig 2017-10-10 15:19:45.611896396 +0100
++++ lib/curl_setup.h 2017-10-17 15:42:25.304921197 +0100
+@@ -314,7 +314,6 @@
+ * In clib2 arpa/inet.h warns that some prototypes may clash
+ * with bsdsocket.library. This avoids the definition of those.
+ */
+-# define __NO_NET_API
+ #endif
+
+ #include <stdio.h>
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=6a0a02818b45d785a7da3fe8d7fdde6256b06597
commit 6a0a02818b45d785a7da3fe8d7fdde6256b06597
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
libcares/m68k-unknown-amigaos: add IPV6 patch
diff --git a/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
new file mode 100644
index 0000000..3fedae6
--- /dev/null
+++ b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
@@ -0,0 +1,67 @@
+--- src/lib/ares_ipv6.h.orig 2017-10-10 15:19:45.611896396 +0100
++++ src/lib/ares_ipv6.h 2017-10-17 15:42:25.304921197 +0100
+@@ -22,6 +22,7 @@
+ #endif
+
+ #ifndef HAVE_STRUCT_SOCKADDR_IN6
++#define s6_addr _S6_un._S6_u8
+ struct sockaddr_in6
+ {
+ unsigned short sin6_family;
+--- src/lib/ares__sortaddrinfo.c.orig 2017-10-10 15:19:45.611896396 +0100
++++ src/lib/ares__sortaddrinfo.c 2017-10-17 15:42:25.304921197 +0100
+@@ -71,6 +71,40 @@
+
+ #define ARES_IN_LOOPBACK(a) ((((long int)(a)) & 0xff000000) == 0x7f000000)
+
++#include <inttypes.h>
++#ifndef IN6_IS_ADDR_LINKLOCAL
++#define IN6_IS_ADDR_LINKLOCAL(a) \
++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
++ == htonl (0xfe800000))
++#endif
++#ifndef IN6_IS_ADDR_LOOPBACK
++#define IN6_IS_ADDR_LOOPBACK(a) \
++ (((__const uint32_t *) (a))[0] == 0 \
++ && ((__const uint32_t *) (a))[1] == 0 \
++ && ((__const uint32_t *) (a))[2] == 0 \
++ && ((__const uint32_t *) (a))[3] == htonl (1))
++#endif
++#ifndef IN6_IS_ADDR_MULTICAST
++#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
++#endif
++#ifndef IN6_IS_ADDR_SITELOCAL
++#define IN6_IS_ADDR_SITELOCAL(a) \
++ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
++ == htonl (0xfec00000))
++#endif
++#ifndef IN6_IS_ADDR_V4COMPAT
++#define IN6_IS_ADDR_V4COMPAT(a) \
++ ((((__const uint32_t *) (a))[0] == 0) \
++ && (((__const uint32_t *) (a))[1] == 0) \
++ && (((__const uint32_t *) (a))[2] == 0) \
++ && (ntohl (((__const uint32_t *) (a))[3]) > 1))
++#endif
++#ifndef IN6_IS_ADDR_V4MAPPED
++#define IN6_IS_ADDR_V4MAPPED(a) \
++ ((((__const uint32_t *) (a))[0] == 0) \
++ && (((__const uint32_t *) (a))[1] == 0) \
++ && (((__const uint32_t *) (a))[2] == htonl (0xffff)))
++#endif
+ /* RFC 4193. */
+ #define ARES_IN6_IS_ADDR_ULA(a) (((a)->s6_addr[0] & 0xfe) == 0xfc)
+
+@@ -253,8 +286,13 @@
+ /*
+ * Find number of matching initial bits between the two addresses a1 and a2.
+ */
++#ifndef HAVE_STRUCT_SOCKADDR_IN6
++static int common_prefix_len(const struct ares_in6_addr *a1,
++ const struct ares_in6_addr *a2)
++#else
+ static int common_prefix_len(const struct in6_addr *a1,
+ const struct in6_addr *a2)
++#endif
+ {
+ const char *p1 = (const char *)a1;
+ const char *p2 = (const char *)a2;
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=da2a97fb030faa0f5c48b5c6e6ba21982dd8ff2b
commit da2a97fb030faa0f5c48b5c6e6ba21982dd8ff2b
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
OpenSSL/m68k-unknown-amigaos: refresh patches
diff --git
a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
deleted file mode 100644
index 3c18b7d..0000000
--- a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <openssl/rand.h>
-#include <openssl/sha.h>
-#include "rand_lcl.h"
-
-#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4)
-#define __USE_INLINE__ 1
-
-#include <proto/exec.h>
-#include <proto/timer.h>
-#include <devices/timer.h>
-
-/* Maximum number of attempts to get a delay of 1 microsecond that is not
equal to 0 */
-#define MAX_ATTEMPTS 1000
-
-#ifdef __amigaos4__
-
-#ifdef CreateMsgPort
-#undef CreateMsgPort
-#endif
-#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL)
-#ifdef DeleteMsgPort
-#undef DeleteMsgPort
-#endif
-#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort)
-#ifdef CreateIORequest
-#undef CreateIORequest
-#endif
-#define CreateIORequest(ioReplyPort,size)
AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE)
-#ifdef DeleteIORequest
-#undef DeleteIORequest
-#endif
-#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq)
-
-#else
-
-#define GetInterface(a, b, c, d) 1
-#define DropInterface(x)
-
-/* OS3 has a different but compatible TimeVal definition */
-struct TimeVal
-{
- ULONG Seconds;
- ULONG Microseconds;
-};
-
-/* ...and ditto for TimeRequest */
-struct TimeRequest
-{
- struct IORequest Request;
- struct TimeVal Time;
-};
-
-#endif /* !__amigaos4__ */
-
-int RAND_poll(void)
-{
- unsigned char temp_buffer[SHA_DIGEST_LENGTH],
data_buffer[SHA_DIGEST_LENGTH];
- struct MsgPort *port = NULL;
- double entropy_added = 0;
- struct TimeRequest *time_request = NULL;
-#ifdef __amigaos4__
- struct IOStdReq *entropy_request = NULL;
-
- if ((port = CreateMsgPort())
- && (entropy_request = (struct IOStdReq *)CreateIORequest(port,
sizeof(*entropy_request))))
- {
- if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest
*)entropy_request, 0) == 0)
- {
- while(entropy_added < ENTROPY_NEEDED)
- {
- entropy_request->io_Command = TR_READENTROPY;
- entropy_request->io_Data = &temp_buffer[0];
- entropy_request->io_Length =
sizeof(temp_buffer);
-
- if (DoIO((struct IORequest *)entropy_request)
== 0)
- {
- SHA1(&temp_buffer[0],
sizeof(temp_buffer), &data_buffer[0]);
- RAND_add(&data_buffer[0],
sizeof(data_buffer), sizeof(data_buffer));
- entropy_added += sizeof(data_buffer);
- }
- else
- break;
- }
-
- CloseDevice((struct IORequest *)entropy_request);
- }
- }
-
- DeleteIORequest((struct IORequest *)entropy_request);
-#endif /* __amigaos4__ */
-
- /* The following block will be used on "classic" machines. It does not
generate
- * a high degree of randomness, but it does the job since RAND_poll is
- * called only once by OpenSSL to generate a 32 byte seed.
- */
- if (entropy_added < ENTROPY_NEEDED
- && (port || (port = CreateMsgPort()))
- && (time_request = (struct TimeRequest *)CreateIORequest(port,
sizeof(*time_request))))
- {
- if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest
*)time_request, 0) == 0)
- {
- #if defined(__amigaos4__)
- struct TimerIFace *ITimer = NULL;
- #endif
- struct Device *TimerBase;
-
- if ((TimerBase = time_request->Request.io_Device)
- #if defined(__amigaos4__)
- && (ITimer = (struct TimerIFace
*)GetInterface((struct Library *)TimerBase, "main", 1, NULL))
- #endif
- )
- {
- struct EClockVal curr_eclock;
- ULONG prev_ev_lo = 0;
- struct TimeVal tv;
- int i, attempt;
- BOOL aborted;
-
- ReadEClock(&curr_eclock);
- aborted = FALSE;
-
- while(!aborted && entropy_added <
ENTROPY_NEEDED)
- {
- for(i = 0;
- !aborted && i <
(int)sizeof(temp_buffer) - (int)sizeof(ULONG);
- i++)
- {
- attempt = 0;
-
- /* Ask for a one microsecond
delay and measure the time
- * the delay actually took.
- */
- do
- {
-
time_request->Request.io_Command = TR_ADDREQUEST;
-
time_request->Time.Seconds = 0;
-
time_request->Time.Microseconds = 1;
-
- if (DoIO((struct
IORequest *)time_request) == 0)
- {
- prev_ev_lo =
curr_eclock.ev_lo;
-
ReadEClock(&curr_eclock);
-
- attempt++;
- }
- else
- aborted = TRUE;
- } while(!aborted && prev_ev_lo
== 0 && attempt < MAX_ATTEMPTS);
-
- if (attempt >= MAX_ATTEMPTS)
- aborted = TRUE;
-
- /* Since we are going for
randomness, ev_hi is irrelevant */
- temp_buffer[i] = (unsigned
char)(curr_eclock.ev_lo - prev_ev_lo);
- }
-
- GetSysTime(&tv);
-
- if (sizeof(temp_buffer) > sizeof(ULONG))
- *(ULONG
*)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)]
- = tv.Microseconds;
-
- /* Shuffle the bits around and specify
that about
- * one fourth of it adds to the entropy.
- */
- if (!aborted)
- {
- SHA1(&temp_buffer[0],
sizeof(temp_buffer), &data_buffer[0]);
- RAND_add(&data_buffer[0],
sizeof(data_buffer), (double)sizeof(data_buffer) / 4);
- entropy_added +=
sizeof(data_buffer) / 4;
- }
- }
- }
-
- #if defined(__amigaos4__)
- DropInterface((struct Interface *)ITimer);
- #endif
- CloseDevice((struct IORequest *)time_request);
- }
- }
-
- DeleteIORequest((struct IORequest *)time_request);
-
- DeleteMsgPort(port);
-
- return(entropy_added >= ENTROPY_NEEDED);
-}
-
-#endif /* OPENSSL_SYS_AMIGA */
diff --git
a/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
new file mode 100644
index 0000000..205d527
--- /dev/null
+++
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
@@ -0,0 +1,282 @@
+#include "internal/cryptlib.h"
+#include <openssl/rand.h>
+#include <openssl/sha.h>
+#include "crypto/rand_pool.h"
+#include "crypto/rand.h"
+#include "prov/seeding.h"
+
+#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4)
+
+# ifndef OPENSSL_RAND_SEED_OS
+# error "Unsupported seeding method configured; must be os"
+# endif
+
+#define __USE_INLINE__ 1
+
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <proto/exec.h>
+#include <proto/timer.h>
+#include <devices/timer.h>
+
+/* Maximum number of attempts to get a delay of 1 microsecond that is not
equal to 0 */
+#define MAX_ATTEMPTS 1000
+
+#ifdef __amigaos4__
+
+#ifdef CreateMsgPort
+#undef CreateMsgPort
+#endif
+#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL)
+#ifdef DeleteMsgPort
+#undef DeleteMsgPort
+#endif
+#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort)
+#ifdef CreateIORequest
+#undef CreateIORequest
+#endif
+#define CreateIORequest(ioReplyPort,size)
AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE)
+#ifdef DeleteIORequest
+#undef DeleteIORequest
+#endif
+#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq)
+
+#else
+
+#define GetInterface(a, b, c, d) 1
+#define DropInterface(x)
+
+/* OS3 has a different but compatible TimeVal definition */
+struct TimeVal
+{
+ ULONG Seconds;
+ ULONG Microseconds;
+};
+
+/* ... and ditto for TimeRequest */
+struct TimeRequest
+{
+ struct IORequest Request;
+ struct TimeVal Time;
+};
+
+#endif /* !__amigaos4__ */
+
+size_t ossl_pool_acquire_entropy(RAND_POOL *pool)
+{
+ unsigned char temp_buffer[SHA_DIGEST_LENGTH],
data_buffer[SHA_DIGEST_LENGTH];
+ struct MsgPort *port = NULL;
+ size_t bytes_needed;
+ size_t entropy_available = 0;
+ struct TimeRequest *time_request = NULL;
+#ifdef __amigaos4__
+ struct IOStdReq *entropy_request = NULL;
+
+ bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
+
+ if ((port = CreateMsgPort())
+ && (entropy_request = (struct IOStdReq *)CreateIORequest(port,
sizeof(*entropy_request))))
+ {
+ if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest
*)entropy_request, 0) == 0)
+ {
+ while(bytes_needed > 0)
+ {
+ entropy_request->io_Command = TR_READENTROPY;
+ entropy_request->io_Data = &temp_buffer[0];
+ entropy_request->io_Length = sizeof(temp_buffer);
+
+ if (DoIO((struct IORequest *)entropy_request) == 0)
+ {
+ unsigned char *buffer;
+ size_t bytes = (bytes_needed < sizeof(data_buffer) ?
bytes_needed : sizeof(data_buffer));
+
+ buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
+ SHA1(&temp_buffer[0], sizeof(temp_buffer),
&data_buffer[0]);
+ memcpy(buffer, data_buffer, bytes);
+ ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
+ bytes_needed -= bytes;
+ }
+ else
+ break;
+ }
+
+ CloseDevice((struct IORequest *)entropy_request);
+ }
+ }
+
+ DeleteIORequest((struct IORequest *)entropy_request);
+
+ entropy_available = ossl_rand_pool_entropy_available(pool);
+ if (entropy_available > 0)
+ return entropy_available;
+#endif /* __amigaos4__ */
+
+ /* The following block will be used on "classic" machines. It does not
generate
+ * a high degree of randomness, but it does the job since RAND_poll is
+ * called only once by OpenSSL to generate a 32 byte seed.
+ */
+
+ bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
+
+ if (bytes_needed > 0
+ && (port || (port = CreateMsgPort()))
+ && (time_request = (struct TimeRequest *)CreateIORequest(port,
sizeof(*time_request))))
+ {
+ if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest
*)time_request, 0) == 0)
+ {
+ #if defined(__amigaos4__)
+ struct TimerIFace *ITimer = NULL;
+ #endif
+ struct Device *TimerBase;
+
+ if ((TimerBase = time_request->Request.io_Device)
+ #if defined(__amigaos4__)
+ && (ITimer = (struct TimerIFace *)GetInterface((struct Library
*)TimerBase, "main", 1, NULL))
+ #endif
+ )
+ {
+ struct EClockVal curr_eclock;
+ ULONG prev_ev_lo = 0;
+ struct TimeVal tv;
+ int i, attempt;
+ BOOL aborted;
+
+ ReadEClock(&curr_eclock);
+ aborted = FALSE;
+
+ while(!aborted && bytes_needed > 0)
+ {
+ for(i = 0;
+ !aborted && i < (int)sizeof(temp_buffer) -
(int)sizeof(ULONG);
+ i++)
+ {
+ attempt = 0;
+
+ /* Ask for a one microsecond delay and measure the time
+ * the delay actually took.
+ */
+ do
+ {
+ time_request->Request.io_Command = TR_ADDREQUEST;
+ time_request->Time.Seconds = 0;
+ time_request->Time.Microseconds = 1;
+
+ if (DoIO((struct IORequest *)time_request) == 0)
+ {
+ prev_ev_lo = curr_eclock.ev_lo;
+ ReadEClock(&curr_eclock);
+
+ attempt++;
+ }
+ else
+ aborted = TRUE;
+ } while(!aborted && prev_ev_lo == 0 && attempt <
MAX_ATTEMPTS);
+
+ if (attempt >= MAX_ATTEMPTS)
+ aborted = TRUE;
+
+ /* Since we are going for randomness, ev_hi is
irrelevant */
+ temp_buffer[i] = (unsigned char)(curr_eclock.ev_lo -
prev_ev_lo);
+ }
+
+ GetSysTime(&tv);
+
+ if (sizeof(temp_buffer) > sizeof(ULONG))
+ *(ULONG *)&temp_buffer[sizeof(temp_buffer) -
sizeof(ULONG)]
+ = tv.Microseconds;
+
+ /* Shuffle the bits around and specify that about
+ * one fourth of it adds to the entropy.
+ */
+ if (!aborted)
+ {
+ unsigned char *buffer;
+ size_t bytes = (bytes_needed < sizeof(data_buffer) ?
bytes_needed : sizeof(data_buffer));
+
+ SHA1(&temp_buffer[0], sizeof(temp_buffer),
&data_buffer[0]);
+
+ ossl_rand_pool_add_end(pool, bytes,
(sizeof(data_buffer) / 4) * 8);
+ bytes_needed -= bytes;
+ }
+ }
+ }
+
+ #if defined(__amigaos4__)
+ DropInterface((struct Interface *)ITimer);
+ #endif
+ CloseDevice((struct IORequest *)time_request);
+ }
+ }
+
+ DeleteIORequest((struct IORequest *)time_request);
+
+ DeleteMsgPort(port);
+
+ return ossl_rand_pool_entropy_available(pool);
+}
+
+int ossl_pool_add_nonce_data(RAND_POOL *pool)
+{
+ struct {
+ pid_t pid;
+ CRYPTO_THREAD_ID tid;
+ uint64_t time;
+ } data;
+
+ /* Erase the entire structure including any padding */
+ memset(&data, 0, sizeof(data));
+
+ /*
+ * Add process id, thread id, and a high resolution timestamp to
+ * ensure that the nonce is unique with high probability for
+ * different process instances.
+ */
+ data.pid = getpid();
+ data.tid = CRYPTO_THREAD_get_current_id();
+ /*XXX: can this be improved? */
+ data.time = time(NULL);
+
+ return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0);
+}
+
+int ossl_rand_pool_add_additional_data(RAND_POOL *pool)
+{
+ struct {
+ int fork_id;
+ CRYPTO_THREAD_ID tid;
+ uint64_t time;
+ } data;
+
+ /* Erase the entire structure including any padding */
+ memset(&data, 0, sizeof(data));
+
+ /*
+ * Add some noise from the thread id and a high resolution timer.
+ * The fork_id adds some extra fork-safety.
+ * The thread id adds a little randomness if the drbg is accessed
+ * concurrently (which is the case for the <master> drbg).
+ */
+ data.fork_id = openssl_get_fork_id();
+ data.tid = CRYPTO_THREAD_get_current_id();
+ /*XXX: can this be improved? */
+ data.time = (uint64_t) time(NULL);
+
+ return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0);
+}
+
+int ossl_rand_pool_init(void)
+{
+ return 1;
+}
+
+void ossl_rand_pool_cleanup(void)
+{
+}
+
+void ossl_rand_pool_keep_random_devices_open(int keep)
+{
+}
+
+#endif /* OPENSSL_SYS_AMIGA */
diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
index 947eeca..1e677d2 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
@@ -1,6 +1,6 @@
---- apps.c 2014-10-15 13:53:39.000000000 +0100
-+++ apps/apps.c 2015-01-05 21:02:13.650018727 +0000
-@@ -2872,10 +2872,11 @@ double app_tminterval(int stop, int user
+--- apps/lib/apps.c.orig 2014-10-15 13:53:39.000000000 +0100
++++ apps/lib/apps.c 2015-01-05 21:02:13.650018727 +0000
+@@ -2797,10 +2797,11 @@ double app_tminterval(int stop, int user
struct rusage rus;
struct timeval now;
static struct timeval tmstart;
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p
new file mode 100644
index 0000000..8d9684e
--- /dev/null
+++
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p
@@ -0,0 +1,11 @@
+--- apps/include/http_server.h.orig 2017-11-21 22:49:00.185608040 +0000
++++ apps/include/http_server.h 2017-11-21 22:49:21.488219518 +0000
+@@ -27,7 +27,7 @@
+ # endif
+
+ # if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \
+- && !defined(OPENSSL_NO_POSIX_IO)
++ && !defined(OPENSSL_NO_POSIX_IO) && !defined(NO_SYSLOG)
+ # define HTTP_DAEMON
+ # include <sys/types.h>
+ # include <sys/wait.h>
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
index 4f6fa4b..93db04c 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
@@ -1,14 +1,14 @@
---- crypto/bio/b_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000
-+++ crypto/bio/b_sock2.c 2019-02-15 10:07:15.637654488 +0000
-@@ -94,6 +94,7 @@
+--- crypto/bio/bio_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000
++++ crypto/bio/bio_sock2.c 2019-02-15 10:07:15.637654488 +0000
+@@ -98,6 +98,7 @@
}
}
+#if defined(TCP_NODELAY)
if (options & BIO_SOCK_NODELAY) {
- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0)
{
- SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error());
-@@ -101,6 +102,7 @@
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
+ (const void *)&on, sizeof(on)) != 0) {
+@@ -107,6 +108,7 @@
return 0;
}
}
@@ -16,19 +16,19 @@
if (connect(sock, BIO_ADDR_sockaddr(addr),
BIO_ADDR_sockaddr_size(addr)) == -1) {
-@@ -193,6 +195,7 @@
+@@ -252,6 +254,7 @@
}
}
+#if defined(TCP_NODELAY)
if (options & BIO_SOCK_NODELAY) {
- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0)
{
- SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error());
-@@ -200,6 +203,7 @@
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
+ (const void *)&on, sizeof(on)) != 0) {
+@@ -261,6 +264,7 @@
return 0;
}
}
+#endif
- # ifdef IPV6_V6ONLY
- if (BIO_ADDR_family(addr) == AF_INET6) {
+ /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */
+ # if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
index 0d5492f..3fa3a53 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
@@ -1,6 +1,6 @@
--- crypto/bn/bn_div.c 2017-01-26 13:22:03.000000000 +0000
+++ crypto/bn/bn_div.c 2017-02-11 16:06:29.437010335 +0000
-@@ -175,6 +175,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons
+@@ -194,6 +194,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons
q; \
})
# define REMAINDER_IS_ALREADY_CALCULATED
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
deleted file mode 100644
index 7447d54..0000000
---
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
+++ /dev/null
@@ -1,36 +0,0 @@
---- crypto/include/internal/md32_common.h 2017-11-02 14:29:03.000000000
+0000
-+++ crypto/include/internal/md32_common.h 2018-07-23 20:12:11.228066913
+0100
-@@ -182,6 +182,9 @@
- # define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l))
- # endif
- # endif
-+# elif defined(__mc68020)
-+# define HOST_c2l(c,l) ({ asm volatile ("movel %0@+,%1" : "=a"(c), "=d"(l)
: "0"(c)); })
-+# define HOST_l2c(l,c) ({ asm volatile ("movel %1,%0@+" : "=a"(c) :
"d"(l), "0"(c)); })
- # endif
- # endif
- # if defined(__s390__) || defined(__s390x__)
-@@ -215,6 +218,22 @@
- # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \
- :"=m"(*(unsigned int *)(c)) :"d"(l));\
- (c)+=4; (l); })
-+# elif defined(__mc68020)
-+# define HOST_c2l(c,l) ({ unsigned int r; \
-+ asm volatile ("movel %1@+,%0\n" \
-+ "rorw #8,%0\n" \
-+ "swap %0\n" \
-+ "rorw #8,%0\n" \
-+ : "=d"(r), "=a"(c) \
-+ : "1"(c)); \
-+ (l)=r; })
-+# define HOST_l2c(l,c) ({ unsigned int r=(l); \
-+ asm volatile ("rorw #8,%0\n" \
-+ "swap %0\n" \
-+ "rorw #8,%0\n" \
-+ "movel %0,%1@+\n" \
-+ : "=d"(r), "=a"(c) \
-+ : "0"(r), "1"(c)); })
- # endif
- # endif
- # if defined(__i386) || defined(__i386__) || defined(__x86_64) ||
defined(__x86_64__)
-
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
deleted file mode 100644
index 58b672f..0000000
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
+++ /dev/null
@@ -1,9 +0,0 @@
---- crypto/rand/build.info.orig 2017-11-22 11:36:06.585363219 +0000
-+++ crypto/rand/build.info 2017-11-22 11:36:39.267232034 +0000
-@@ -1,4 +1,4 @@
- LIBS=../../libcrypto
- SOURCE[../../libcrypto]=\
-- md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
-- rand_win.c rand_unix.c rand_vms.c
-+ md_rand.c randfile.c rand_lib.c rand_err.c rand_amiga.c \
-+ rand_egd.c rand_win.c rand_unix.c rand_vms.c
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
index 0448499..3407a48 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
@@ -1,21 +1,21 @@
--- crypto/ui/ui_openssl.c.orig 2017-11-23 13:22:15.760078583 +0000
+++ crypto/ui/ui_openssl.c 2017-11-23 13:21:40.534382076 +0000
-@@ -99,6 +99,18 @@
+@@ -103,6 +103,18 @@
+ # undef SGTTY
+ # endif
- #endif
-
-+#if defined(OPENSSL_SYS_AMIGAOS3)
-+#undef TERMIOS
-+#undef TERMIO
-+#undef SGTTY
++# if defined(OPENSSL_SYS_AMIGAOS3)
++# undef TERMIOS
++# undef TERMIO
++# undef SGTTY
+struct termios { int foo; };
-+# define TTY_STRUCT struct termios
-+# define TTY_FLAGS foo
-+# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1
-+# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0
-+# define ECHO 0
-+#endif
++# define TTY_STRUCT struct termios
++# define TTY_FLAGS foo
++# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1
++# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0
++# define ECHO 0
++# endif
+
- #ifdef TERMIOS
- # include <termios.h>
- # define TTY_STRUCT struct termios
+ # ifdef TERMIOS
+ # include <termios.h>
+ # define TTY_STRUCT struct termios
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
deleted file mode 100644
index 6ea1ec8..0000000
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/openssl/e_os2.h.orig 2017-11-21 23:09:39.684814614 +0000
-+++ include/openssl/e_os2.h 2017-11-21 23:10:32.501369938 +0000
-@@ -223,6 +223,8 @@
- # define OSSL_SSIZE_MAX SSIZE_MAX
- # elif defined(_POSIX_SSIZE_MAX)
- # define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
-+# else
-+# define OSSL_SSIZE_MAX INT_MAX
- # endif
- # endif
-
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p
new file mode 100644
index 0000000..c887eff
--- /dev/null
+++
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p
@@ -0,0 +1,12 @@
+--- providers/implementations/rands/seeding/build.info.orig 2017-11-21
22:49:00.185608040 +0000
++++ providers/implementations/rands/seeding/build.info 2017-11-21
22:49:21.488219518 +0000
+@@ -5,6 +5,9 @@
+ IF[{- $config{target} =~ /vms/i -}]
+ $COMMON=$COMMON rand_vms.c
+ ENDIF
++IF[{- $config{target} =~ /amiga/i -}]
++ $COMMON=$COMMON rand_amiga.c
++ENDIF
+
+ SOURCE[../../../libdefault.a]=$COMMON
+
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=cd0deb266d6aa466033d8c75075d92aae5a83812
commit cd0deb266d6aa466033d8c75075d92aae5a83812
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
m68k-unknown-amigaos: define RLIMIT_NOFILE for iconv
This is unlikely to be the correct answer here, however (as
who knows if getrlimit() actually works on this platform)
diff --git a/sdk/Makefile b/sdk/Makefile
index 1cc3418..b6bef03 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -158,7 +158,7 @@ ifeq ($(TARGET),m68k-unknown-amigaos)
SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, roadshow.d libiconv.d libtre.d
libpbl.d $(COMMON_SDK_ITEMS) libjpeg.d)
EXTRAARGS_LIBCARES := --disable-shared --without-random
EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random
--disable-threaded-resolver --with-amissl --with-zlib --disable-rt
--disable-ipv6
- LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024"
+ LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024 -DRLIMIT_NOFILE=6"
LIBJPEG_ENV := LDFLAGS="-lm"
LIBJPEG_TURBO_ENV := LDFLAGS="-lm"
LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API"
LIBS="-lm"
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=a7a391d352ba8554c4f6dfe49a18213842909e9a
commit a7a391d352ba8554c4f6dfe49a18213842909e9a
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
libiconv/m68k-unknown-amigaos: refresh patches
diff --git
a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
index d69557d..ac19b03 100644
--- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
+++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
@@ -1,6 +1,6 @@
--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100
+++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000
-@@ -289,7 +289,7 @@ getprogname (void)
+@@ -288,7 +288,7 @@ getprogname (void)
}
return "?";
# else
diff --git
a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
index b0fbd6a..a70f0b5 100644
--- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
+++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
@@ -1,6 +1,6 @@
--- srclib/unistd.in.h.orig 2017-03-27 23:12:52.149619622 +0100
+++ srclib/unistd.in.h 2017-03-27 23:13:12.582243962 +0100
-@@ -1873,40 +1873,6 @@
+@@ -1873,44 +1873,6 @@
#endif
@@ -9,24 +9,28 @@
- bytes of it into BUF. Return the number of bytes placed into BUF if
- successful, otherwise -1 and errno set.
- See the POSIX:2008 specification
-- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>.
*/
+-
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
-# if @REPLACE_READLINK@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define readlink rpl_readlink
-# endif
-_GL_FUNCDECL_RPL (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize)
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize)
- _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize));
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize));
-# else
-# if !@HAVE_READLINK@
-_GL_FUNCDECL_SYS (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize)
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize)
- _GL_ARG_NONNULL ((1, 2)));
-# endif
-_GL_CXXALIAS_SYS (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize));
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize));
-# endif
-_GL_CXXALIASWARN (readlink);
-#elif defined GNULIB_POSIXCHECK
diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
index d69557d..ac19b03 100644
--- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
+++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
@@ -1,6 +1,6 @@
--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100
+++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000
-@@ -289,7 +289,7 @@ getprogname (void)
+@@ -288,7 +288,7 @@ getprogname (void)
}
return "?";
# else
-----------------------------------------------------------------------
Summary of changes:
sdk/Makefile | 21 ++-
.../m68k-unknown-amigaos/crypto/rand/rand_amiga.c | 189 --------------------
.../implementations/rands/seeding/rand_amiga.c | 11 +-
.../ipv6-support.p | 5 +-
.../m68k-unknown-amigaos/lib.curl_setup.h.p | 10 ++
.../m68k-unknown-amigaos/srclib.getprogname.c.p | 2 +-
.../m68k-unknown-amigaos/srclib.unistd.in.h.p | 16 +-
.../libiconv/ppc-amigaos/srclib.getprogname.c.p | 2 +-
.../openssl/m68k-unknown-amigaos/apps.apps.c.p | 6 +-
.../apps.include.http_server.h.p | 0
.../m68k-unknown-amigaos/crypto.bio.b_sock2.c.p | 24 +--
.../m68k-unknown-amigaos/crypto.bn.bn_div.c.p | 2 +-
.../crypto.include.internal.md32_common.h.p | 36 ----
.../m68k-unknown-amigaos/crypto.rand.build.info.p | 9 -
.../m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p | 32 ++--
.../m68k-unknown-amigaos/include.openssl.e_os2.h.p | 11 --
...ders.implementations.rands.seeding.build.info.p | 0
17 files changed, 81 insertions(+), 295 deletions(-)
delete mode 100644
sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
copy sdk/recipes/files/openssl/{ppc-amigaos =>
m68k-unknown-amigaos}/providers/implementations/rands/seeding/rand_amiga.c (98%)
copy sdk/recipes/patches/libcares/{ppc-amigaos =>
m68k-unknown-amigaos}/ipv6-support.p (98%)
create mode 100644
sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
copy sdk/recipes/patches/openssl/{ppc-amigaos =>
m68k-unknown-amigaos}/apps.include.http_server.h.p (100%)
delete mode 100644
sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
delete mode 100644
sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
delete mode 100644
sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
copy sdk/recipes/patches/openssl/{ppc-amigaos =>
m68k-unknown-amigaos}/providers.implementations.rands.seeding.build.info.p
(100%)
diff --git a/sdk/Makefile b/sdk/Makefile
index 1cc3418..da37722 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -109,6 +109,7 @@ SDK_ITEMS :=
COMMON_SDK_ITEMS := zlib.d openssl.d libpng.d libcares.d libcurl.d libexpat.d
+LIBCURL_SSL := openssl
LIBCURL_DISABLES := $(patsubst %,--disable-%,ftp file dict ldap ldaps mqtt
rtsp telnet gopher tftp pop3 imap smb smtp manual)
FREETYPE_ENV := LIBPNG_CFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config
--cflags) LIBPNG_LDFLAGS=$$($(GCCSDK_INSTALL_ENV)/bin/libpng-config --ldflags)
@@ -157,11 +158,19 @@ endif
ifeq ($(TARGET),m68k-unknown-amigaos)
SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, roadshow.d libiconv.d libtre.d
libpbl.d $(COMMON_SDK_ITEMS) libjpeg.d)
EXTRAARGS_LIBCARES := --disable-shared --without-random
- EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random
--disable-threaded-resolver --with-amissl --with-zlib --disable-rt
--disable-ipv6
- LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024"
+ # XXX: reinstate amissl when there's v5 sdk?
+ #LIBCURL_SSL := amissl
+ EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random
--disable-threaded-resolver --with-zlib --disable-rt --disable-ipv6
+ LIBICONV_ENV := CFLAGS="-DPATH_MAX=1024 -DRLIMIT_NOFILE=6"
LIBJPEG_ENV := LDFLAGS="-lm"
LIBJPEG_TURBO_ENV := LDFLAGS="-lm"
- LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API"
LIBS="-lm"
+ # XXX: build openssl against bsdsocket.library?
+ #OPENSSL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude"
CPPFLAGS="-D__NO_NET_API"
+ ifeq ($(LIBCURL_SSL),openssl)
+ LIBCURL_ENV := LIBS="-lm -lnet"
+ else
+ LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API"
LIBS="-lm"
+ endif
LIBEXPAT_ENV := LDFLAGS="-lm"
endif
@@ -384,8 +393,8 @@ $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz:
# OpenSSL
$(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d
$(BUILDSTEPS)/openssl-src.d
-ifneq ($(TARGET),m68k-unknown-amigaos)
- cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure
--prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads
$(EXTRAARGS_OPENSSL)
+ifeq ($(LIBCURL_SSL),openssl)
+ cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env)
$(OPENSSL_ENV) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared
no-threads $(EXTRAARGS_OPENSSL)
cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install
endif
touch $@
@@ -507,7 +516,7 @@ $(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz:
# libcurl
$(BUILDSTEPS)/libcurl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d
$(BUILDSTEPS)/openssl.d $(BUILDSTEPS)/libcares.d $(BUILDSTEPS)/libcurl-src.d
- cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS=""
$(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET)
--host=$(TARGET) --disable-shared --with-openssl --without-libidn2
${EXTRAARGS_LIBCURL}
+ cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) CFLAGS=""
$(LIBCURL_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET)
--host=$(TARGET) --disable-shared --with-$(LIBCURL_SSL) --without-libidn2
${EXTRAARGS_LIBCURL}
cd $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) && $(env) make install
touch $@
diff --git
a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
deleted file mode 100644
index 3c18b7d..0000000
--- a/sdk/recipes/files/openssl/m68k-unknown-amigaos/crypto/rand/rand_amiga.c
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <openssl/rand.h>
-#include <openssl/sha.h>
-#include "rand_lcl.h"
-
-#if defined(OPENSSL_SYS_AMIGAOS3) || defined(OPENSSL_SYS_AMIGAOS4)
-#define __USE_INLINE__ 1
-
-#include <proto/exec.h>
-#include <proto/timer.h>
-#include <devices/timer.h>
-
-/* Maximum number of attempts to get a delay of 1 microsecond that is not
equal to 0 */
-#define MAX_ATTEMPTS 1000
-
-#ifdef __amigaos4__
-
-#ifdef CreateMsgPort
-#undef CreateMsgPort
-#endif
-#define CreateMsgPort() AllocSysObject(ASOT_PORT,NULL)
-#ifdef DeleteMsgPort
-#undef DeleteMsgPort
-#endif
-#define DeleteMsgPort(msgPort) FreeSysObject(ASOT_PORT,msgPort)
-#ifdef CreateIORequest
-#undef CreateIORequest
-#endif
-#define CreateIORequest(ioReplyPort,size)
AllocSysObjectTags(ASOT_IOREQUEST,ASOIOR_ReplyPort,ioReplyPort,ASOIOR_Size,size,TAG_DONE)
-#ifdef DeleteIORequest
-#undef DeleteIORequest
-#endif
-#define DeleteIORequest(ioReq) FreeSysObject(ASOT_IOREQUEST,ioReq)
-
-#else
-
-#define GetInterface(a, b, c, d) 1
-#define DropInterface(x)
-
-/* OS3 has a different but compatible TimeVal definition */
-struct TimeVal
-{
- ULONG Seconds;
- ULONG Microseconds;
-};
-
-/* ...and ditto for TimeRequest */
-struct TimeRequest
-{
- struct IORequest Request;
- struct TimeVal Time;
-};
-
-#endif /* !__amigaos4__ */
-
-int RAND_poll(void)
-{
- unsigned char temp_buffer[SHA_DIGEST_LENGTH],
data_buffer[SHA_DIGEST_LENGTH];
- struct MsgPort *port = NULL;
- double entropy_added = 0;
- struct TimeRequest *time_request = NULL;
-#ifdef __amigaos4__
- struct IOStdReq *entropy_request = NULL;
-
- if ((port = CreateMsgPort())
- && (entropy_request = (struct IOStdReq *)CreateIORequest(port,
sizeof(*entropy_request))))
- {
- if (OpenDevice(TIMERNAME, UNIT_ENTROPY, (struct IORequest
*)entropy_request, 0) == 0)
- {
- while(entropy_added < ENTROPY_NEEDED)
- {
- entropy_request->io_Command = TR_READENTROPY;
- entropy_request->io_Data = &temp_buffer[0];
- entropy_request->io_Length =
sizeof(temp_buffer);
-
- if (DoIO((struct IORequest *)entropy_request)
== 0)
- {
- SHA1(&temp_buffer[0],
sizeof(temp_buffer), &data_buffer[0]);
- RAND_add(&data_buffer[0],
sizeof(data_buffer), sizeof(data_buffer));
- entropy_added += sizeof(data_buffer);
- }
- else
- break;
- }
-
- CloseDevice((struct IORequest *)entropy_request);
- }
- }
-
- DeleteIORequest((struct IORequest *)entropy_request);
-#endif /* __amigaos4__ */
-
- /* The following block will be used on "classic" machines. It does not
generate
- * a high degree of randomness, but it does the job since RAND_poll is
- * called only once by OpenSSL to generate a 32 byte seed.
- */
- if (entropy_added < ENTROPY_NEEDED
- && (port || (port = CreateMsgPort()))
- && (time_request = (struct TimeRequest *)CreateIORequest(port,
sizeof(*time_request))))
- {
- if (OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest
*)time_request, 0) == 0)
- {
- #if defined(__amigaos4__)
- struct TimerIFace *ITimer = NULL;
- #endif
- struct Device *TimerBase;
-
- if ((TimerBase = time_request->Request.io_Device)
- #if defined(__amigaos4__)
- && (ITimer = (struct TimerIFace
*)GetInterface((struct Library *)TimerBase, "main", 1, NULL))
- #endif
- )
- {
- struct EClockVal curr_eclock;
- ULONG prev_ev_lo = 0;
- struct TimeVal tv;
- int i, attempt;
- BOOL aborted;
-
- ReadEClock(&curr_eclock);
- aborted = FALSE;
-
- while(!aborted && entropy_added <
ENTROPY_NEEDED)
- {
- for(i = 0;
- !aborted && i <
(int)sizeof(temp_buffer) - (int)sizeof(ULONG);
- i++)
- {
- attempt = 0;
-
- /* Ask for a one microsecond
delay and measure the time
- * the delay actually took.
- */
- do
- {
-
time_request->Request.io_Command = TR_ADDREQUEST;
-
time_request->Time.Seconds = 0;
-
time_request->Time.Microseconds = 1;
-
- if (DoIO((struct
IORequest *)time_request) == 0)
- {
- prev_ev_lo =
curr_eclock.ev_lo;
-
ReadEClock(&curr_eclock);
-
- attempt++;
- }
- else
- aborted = TRUE;
- } while(!aborted && prev_ev_lo
== 0 && attempt < MAX_ATTEMPTS);
-
- if (attempt >= MAX_ATTEMPTS)
- aborted = TRUE;
-
- /* Since we are going for
randomness, ev_hi is irrelevant */
- temp_buffer[i] = (unsigned
char)(curr_eclock.ev_lo - prev_ev_lo);
- }
-
- GetSysTime(&tv);
-
- if (sizeof(temp_buffer) > sizeof(ULONG))
- *(ULONG
*)&temp_buffer[sizeof(temp_buffer) - sizeof(ULONG)]
- = tv.Microseconds;
-
- /* Shuffle the bits around and specify
that about
- * one fourth of it adds to the entropy.
- */
- if (!aborted)
- {
- SHA1(&temp_buffer[0],
sizeof(temp_buffer), &data_buffer[0]);
- RAND_add(&data_buffer[0],
sizeof(data_buffer), (double)sizeof(data_buffer) / 4);
- entropy_added +=
sizeof(data_buffer) / 4;
- }
- }
- }
-
- #if defined(__amigaos4__)
- DropInterface((struct Interface *)ITimer);
- #endif
- CloseDevice((struct IORequest *)time_request);
- }
- }
-
- DeleteIORequest((struct IORequest *)time_request);
-
- DeleteMsgPort(port);
-
- return(entropy_added >= ENTROPY_NEEDED);
-}
-
-#endif /* OPENSSL_SYS_AMIGA */
diff --git
a/sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
similarity index 98%
copy from
sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c
copy to
sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
index ed315ed..205d527 100644
---
a/sdk/recipes/files/openssl/ppc-amigaos/providers/implementations/rands/seeding/rand_amiga.c
+++
b/sdk/recipes/files/openssl/m68k-unknown-amigaos/providers/implementations/rands/seeding/rand_amiga.c
@@ -51,8 +51,15 @@
/* OS3 has a different but compatible TimeVal definition */
struct TimeVal
{
- uint32 Seconds;
- uint32 Microseconds;
+ ULONG Seconds;
+ ULONG Microseconds;
+};
+
+/* ... and ditto for TimeRequest */
+struct TimeRequest
+{
+ struct IORequest Request;
+ struct TimeVal Time;
};
#endif /* !__amigaos4__ */
diff --git a/sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p
b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
similarity index 98%
copy from sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p
copy to sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
index c6be683..3fedae6 100644
--- a/sdk/recipes/patches/libcares/ppc-amigaos/ipv6-support.p
+++ b/sdk/recipes/patches/libcares/m68k-unknown-amigaos/ipv6-support.p
@@ -10,10 +10,11 @@
unsigned short sin6_family;
--- src/lib/ares__sortaddrinfo.c.orig 2017-10-10 15:19:45.611896396 +0100
+++ src/lib/ares__sortaddrinfo.c 2017-10-17 15:42:25.304921197 +0100
-@@ -71,6 +71,39 @@
+@@ -71,6 +71,40 @@
#define ARES_IN_LOOPBACK(a) ((((long int)(a)) & 0xff000000) == 0x7f000000)
-
+
++#include <inttypes.h>
+#ifndef IN6_IS_ADDR_LINKLOCAL
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
diff --git
a/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
new file mode 100644
index 0000000..ba595ca
--- /dev/null
+++ b/sdk/recipes/patches/libcurl/m68k-unknown-amigaos/lib.curl_setup.h.p
@@ -0,0 +1,10 @@
+--- lib/curl_setup.h.orig 2017-10-10 15:19:45.611896396 +0100
++++ lib/curl_setup.h 2017-10-17 15:42:25.304921197 +0100
+@@ -314,7 +314,6 @@
+ * In clib2 arpa/inet.h warns that some prototypes may clash
+ * with bsdsocket.library. This avoids the definition of those.
+ */
+-# define __NO_NET_API
+ #endif
+
+ #include <stdio.h>
diff --git
a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
index d69557d..ac19b03 100644
--- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
+++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.getprogname.c.p
@@ -1,6 +1,6 @@
--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100
+++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000
-@@ -289,7 +289,7 @@ getprogname (void)
+@@ -288,7 +288,7 @@ getprogname (void)
}
return "?";
# else
diff --git
a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
index b0fbd6a..a70f0b5 100644
--- a/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
+++ b/sdk/recipes/patches/libiconv/m68k-unknown-amigaos/srclib.unistd.in.h.p
@@ -1,6 +1,6 @@
--- srclib/unistd.in.h.orig 2017-03-27 23:12:52.149619622 +0100
+++ srclib/unistd.in.h 2017-03-27 23:13:12.582243962 +0100
-@@ -1873,40 +1873,6 @@
+@@ -1873,44 +1873,6 @@
#endif
@@ -9,24 +9,28 @@
- bytes of it into BUF. Return the number of bytes placed into BUF if
- successful, otherwise -1 and errno set.
- See the POSIX:2008 specification
-- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>.
*/
+-
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
-# if @REPLACE_READLINK@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define readlink rpl_readlink
-# endif
-_GL_FUNCDECL_RPL (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize)
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize)
- _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize));
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize));
-# else
-# if !@HAVE_READLINK@
-_GL_FUNCDECL_SYS (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize)
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize)
- _GL_ARG_NONNULL ((1, 2)));
-# endif
-_GL_CXXALIAS_SYS (readlink, ssize_t,
-- (const char *file, char *buf, size_t bufsize));
+- (const char *restrict file,
+- char *restrict buf, size_t bufsize));
-# endif
-_GL_CXXALIASWARN (readlink);
-#elif defined GNULIB_POSIXCHECK
diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
index d69557d..ac19b03 100644
--- a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
+++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.getprogname.c.p
@@ -1,6 +1,6 @@
--- srclib/getprogname.c 2019-04-26 19:29:00.000000000 +0100
+++ srclib/getprogname.c 2020-03-06 19:32:44.157018596 +0000
-@@ -289,7 +289,7 @@ getprogname (void)
+@@ -288,7 +288,7 @@ getprogname (void)
}
return "?";
# else
diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
index 947eeca..1e677d2 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.apps.c.p
@@ -1,6 +1,6 @@
---- apps.c 2014-10-15 13:53:39.000000000 +0100
-+++ apps/apps.c 2015-01-05 21:02:13.650018727 +0000
-@@ -2872,10 +2872,11 @@ double app_tminterval(int stop, int user
+--- apps/lib/apps.c.orig 2014-10-15 13:53:39.000000000 +0100
++++ apps/lib/apps.c 2015-01-05 21:02:13.650018727 +0000
+@@ -2797,10 +2797,11 @@ double app_tminterval(int stop, int user
struct rusage rus;
struct timeval now;
static struct timeval tmstart;
diff --git
a/sdk/recipes/patches/openssl/ppc-amigaos/apps.include.http_server.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p
similarity index 100%
copy from sdk/recipes/patches/openssl/ppc-amigaos/apps.include.http_server.h.p
copy to
sdk/recipes/patches/openssl/m68k-unknown-amigaos/apps.include.http_server.h.p
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
index 4f6fa4b..93db04c 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
@@ -1,14 +1,14 @@
---- crypto/bio/b_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000
-+++ crypto/bio/b_sock2.c 2019-02-15 10:07:15.637654488 +0000
-@@ -94,6 +94,7 @@
+--- crypto/bio/bio_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000
++++ crypto/bio/bio_sock2.c 2019-02-15 10:07:15.637654488 +0000
+@@ -98,6 +98,7 @@
}
}
+#if defined(TCP_NODELAY)
if (options & BIO_SOCK_NODELAY) {
- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0)
{
- SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error());
-@@ -101,6 +102,7 @@
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
+ (const void *)&on, sizeof(on)) != 0) {
+@@ -107,6 +108,7 @@
return 0;
}
}
@@ -16,19 +16,19 @@
if (connect(sock, BIO_ADDR_sockaddr(addr),
BIO_ADDR_sockaddr_size(addr)) == -1) {
-@@ -193,6 +195,7 @@
+@@ -252,6 +254,7 @@
}
}
+#if defined(TCP_NODELAY)
if (options & BIO_SOCK_NODELAY) {
- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0)
{
- SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error());
-@@ -200,6 +203,7 @@
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
+ (const void *)&on, sizeof(on)) != 0) {
+@@ -261,6 +264,7 @@
return 0;
}
}
+#endif
- # ifdef IPV6_V6ONLY
- if (BIO_ADDR_family(addr) == AF_INET6) {
+ /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */
+ # if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
index 0d5492f..3fa3a53 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p
@@ -1,6 +1,6 @@
--- crypto/bn/bn_div.c 2017-01-26 13:22:03.000000000 +0000
+++ crypto/bn/bn_div.c 2017-02-11 16:06:29.437010335 +0000
-@@ -175,6 +175,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons
+@@ -194,6 +194,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons
q; \
})
# define REMAINDER_IS_ALREADY_CALCULATED
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
deleted file mode 100644
index 7447d54..0000000
---
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p
+++ /dev/null
@@ -1,36 +0,0 @@
---- crypto/include/internal/md32_common.h 2017-11-02 14:29:03.000000000
+0000
-+++ crypto/include/internal/md32_common.h 2018-07-23 20:12:11.228066913
+0100
-@@ -182,6 +182,9 @@
- # define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l))
- # endif
- # endif
-+# elif defined(__mc68020)
-+# define HOST_c2l(c,l) ({ asm volatile ("movel %0@+,%1" : "=a"(c), "=d"(l)
: "0"(c)); })
-+# define HOST_l2c(l,c) ({ asm volatile ("movel %1,%0@+" : "=a"(c) :
"d"(l), "0"(c)); })
- # endif
- # endif
- # if defined(__s390__) || defined(__s390x__)
-@@ -215,6 +218,22 @@
- # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \
- :"=m"(*(unsigned int *)(c)) :"d"(l));\
- (c)+=4; (l); })
-+# elif defined(__mc68020)
-+# define HOST_c2l(c,l) ({ unsigned int r; \
-+ asm volatile ("movel %1@+,%0\n" \
-+ "rorw #8,%0\n" \
-+ "swap %0\n" \
-+ "rorw #8,%0\n" \
-+ : "=d"(r), "=a"(c) \
-+ : "1"(c)); \
-+ (l)=r; })
-+# define HOST_l2c(l,c) ({ unsigned int r=(l); \
-+ asm volatile ("rorw #8,%0\n" \
-+ "swap %0\n" \
-+ "rorw #8,%0\n" \
-+ "movel %0,%1@+\n" \
-+ : "=d"(r), "=a"(c) \
-+ : "0"(r), "1"(c)); })
- # endif
- # endif
- # if defined(__i386) || defined(__i386__) || defined(__x86_64) ||
defined(__x86_64__)
-
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
deleted file mode 100644
index 58b672f..0000000
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p
+++ /dev/null
@@ -1,9 +0,0 @@
---- crypto/rand/build.info.orig 2017-11-22 11:36:06.585363219 +0000
-+++ crypto/rand/build.info 2017-11-22 11:36:39.267232034 +0000
-@@ -1,4 +1,4 @@
- LIBS=../../libcrypto
- SOURCE[../../libcrypto]=\
-- md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
-- rand_win.c rand_unix.c rand_vms.c
-+ md_rand.c randfile.c rand_lib.c rand_err.c rand_amiga.c \
-+ rand_egd.c rand_win.c rand_unix.c rand_vms.c
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
index 0448499..3407a48 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p
@@ -1,21 +1,21 @@
--- crypto/ui/ui_openssl.c.orig 2017-11-23 13:22:15.760078583 +0000
+++ crypto/ui/ui_openssl.c 2017-11-23 13:21:40.534382076 +0000
-@@ -99,6 +99,18 @@
+@@ -103,6 +103,18 @@
+ # undef SGTTY
+ # endif
- #endif
-
-+#if defined(OPENSSL_SYS_AMIGAOS3)
-+#undef TERMIOS
-+#undef TERMIO
-+#undef SGTTY
++# if defined(OPENSSL_SYS_AMIGAOS3)
++# undef TERMIOS
++# undef TERMIO
++# undef SGTTY
+struct termios { int foo; };
-+# define TTY_STRUCT struct termios
-+# define TTY_FLAGS foo
-+# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1
-+# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0
-+# define ECHO 0
-+#endif
++# define TTY_STRUCT struct termios
++# define TTY_FLAGS foo
++# define TTY_get(tty,data) /* tcgetattr(tty,data) */ -1
++# define TTY_set(tty,data) /* tcsetattr(tty,TCSANOW,data) */ 0
++# define ECHO 0
++# endif
+
- #ifdef TERMIOS
- # include <termios.h>
- # define TTY_STRUCT struct termios
+ # ifdef TERMIOS
+ # include <termios.h>
+ # define TTY_STRUCT struct termios
diff --git
a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
deleted file mode 100644
index 6ea1ec8..0000000
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/openssl/e_os2.h.orig 2017-11-21 23:09:39.684814614 +0000
-+++ include/openssl/e_os2.h 2017-11-21 23:10:32.501369938 +0000
-@@ -223,6 +223,8 @@
- # define OSSL_SSIZE_MAX SSIZE_MAX
- # elif defined(_POSIX_SSIZE_MAX)
- # define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
-+# else
-+# define OSSL_SSIZE_MAX INT_MAX
- # endif
- # endif
-
diff --git
a/sdk/recipes/patches/openssl/ppc-amigaos/providers.implementations.rands.seeding.build.info.p
b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p
similarity index 100%
copy from
sdk/recipes/patches/openssl/ppc-amigaos/providers.implementations.rands.seeding.build.info.p
copy to
sdk/recipes/patches/openssl/m68k-unknown-amigaos/providers.implementations.rands.seeding.build.info.p
--
Cross-compilation toolchains and environments
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]