diff options
Diffstat (limited to 'sdk/recipes/patches/openssl/m68k-unknown-amigaos')
7 files changed, 138 insertions, 24 deletions
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 new file mode 100644 index 0000000..1d506af --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p @@ -0,0 +1,36 @@ +--- crypto/bio/b_sock2.c.orig 2017-11-23 12:39:17.912640213 +0000 ++++ crypto/bio/b_sock2.c 2017-11-23 12:41:56.350294762 +0000 +@@ -94,6 +94,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 @@ + return 0; + } + } ++#endif + + if (connect(sock, BIO_ADDR_sockaddr(addr), + BIO_ADDR_sockaddr_size(addr)) == -1) { +--- crypto/bio/b_sock2.c.orig 2017-11-23 12:43:56.318461652 +0000 ++++ crypto/bio/b_sock2.c 2017-11-23 12:44:36.139861658 +0000 +@@ -193,6 +193,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 +201,7 @@ + return 0; + } + } ++#endif + + # ifdef IPV6_V6ONLY + if ((options & BIO_SOCK_V6_ONLY) && BIO_ADDR_family(addr) == AF_INET6) { 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 new file mode 100644 index 0000000..0d5492f --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bn.bn_div.c.p @@ -0,0 +1,25 @@ +--- 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 + q; \ + }) + # define REMAINDER_IS_ALREADY_CALCULATED ++# elif defined(__mc68020__) ++ /* Same rationale as for i386. On the 68020-60/CPU32 the divu ++ * instruction will take a 64 bit dividend in a register pair ++ * and overwrite that pair with the remainder:quotient. ++ * Howard Chu ++ */ ++# undef bn_div_words ++# define bn_div_words(n0,n1,d0) \ ++ ({ asm volatile ( \ ++ "divu.l %4,%2:%3" \ ++ : "=d"(rem), "=d"(q) \ ++ : "0"(n0), "1"(n1), "d"(d0) \ ++ : "cc"); \ ++ q; \ ++ }) ++# define REMAINDER_IS_ALREADY_CALCULATED + # endif /* __<cpu> */ + # endif /* __GNUC__ */ + # endif /* OPENSSL_NO_ASM */ 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 new file mode 100644 index 0000000..7447d54 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.include.internal.md32_common.h.p @@ -0,0 +1,36 @@ +--- 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 new file mode 100644 index 0000000..58b672f --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.rand.build.info.p @@ -0,0 +1,9 @@ +--- 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 new file mode 100644 index 0000000..0448499 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.ui.ui_openssl.c.p @@ -0,0 +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 @@ + + #endif + ++#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 ++ + #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 new file mode 100644 index 0000000..6ea1ec8 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/include.openssl.e_os2.h.p @@ -0,0 +1,11 @@ +--- 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/no-term.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/no-term.p deleted file mode 100644 index 890cef3..0000000 --- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/no-term.p +++ /dev/null @@ -1,24 +0,0 @@ ---- crypto/ui/ui_openssl.c.orig 2011-03-08 22:37:51.000000000 +0000 -+++ crypto/ui/ui_openssl.c 2011-03-08 22:39:00.000000000 +0000 -@@ -218,6 +218,12 @@ - - #endif - -+#if defined(OPENSSL_SYS_AMIGAOS3) -+#undef TERMIOS -+#undef TERMIO -+#undef SGTTY -+#endif -+ - #ifdef TERMIOS - # include <termios.h> - # define TTY_STRUCT struct termios -@@ -266,7 +272,7 @@ - typedef int sig_atomic_t; - #endif - --#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) -+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_AMIGAOS3) - /* - * This one needs work. As a matter of fact the code is unoperational - * and this is only a trick to get it compiled. |