RT3544: Remove MWERKS support
The following #ifdef tests were all removed: __MWERKS__ MAC_OS_pre_X MAC_OS_GUSI_SOURCE MAC_OS_pre_X OPENSSL_SYS_MACINTOSH_CLASSIC OPENSSL_SYS_MACOSX_RHAPSODY Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
parent
4aac102f75
commit
92c7846372
@ -593,8 +593,7 @@ my %table=(
|
||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
|
||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
|
||||
|
||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
|
||||
##### MacOS X (a.k.a. Darwin) setup
|
||||
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN -Wa,-force_cpusubtype_ALL::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:".eval{my $asm=$x86_asm;$asm=~s/cast\-586\.o//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
@ -1,72 +0,0 @@
|
||||
OpenSSL - Port To The Macintosh OS 9 or Earlier
|
||||
===============================================
|
||||
|
||||
Thanks to Roy Wood <roy@centricsystems.ca> initial support for Mac OS (pre
|
||||
X) is now provided. "Initial" means that unlike other platforms where you
|
||||
get an SDK and a "swiss army" openssl application, on Macintosh you only
|
||||
get one sample application which fetches a page over HTTPS(*) and dumps it
|
||||
in a window. We don't even build the test applications so that we can't
|
||||
guarantee that all algorithms are operational.
|
||||
|
||||
Required software:
|
||||
|
||||
- StuffIt Expander 5.5 or later, alternatively MacGzip and SUNtar;
|
||||
- Scriptable Finder;
|
||||
- CodeWarrior Pro 5;
|
||||
|
||||
Installation procedure:
|
||||
|
||||
- fetch the source at ftp://ftp.openssl.org/ (well, you probably already
|
||||
did, huh?)
|
||||
- unpack the .tar.gz file:
|
||||
- if you have StuffIt Expander then just drag it over it;
|
||||
- otherwise uncompress it with MacGzip and then unpack with SUNtar;
|
||||
- locate MacOS folder in OpenSSL source tree and open it;
|
||||
- unbinhex mklinks.as.hqx and OpenSSL.mcp.hqx if present (**), do it
|
||||
"in-place", i.e. unpacked files should end-up in the very same folder;
|
||||
- execute mklinks.as;
|
||||
- open OpenSSL.mcp(***) and build 'GetHTTPS PPC' target(****);
|
||||
- that's it for now;
|
||||
|
||||
(*) URL is hardcoded into ./MacOS/GetHTTPS.src/GetHTTPS.cpp, lines 40
|
||||
to 42, change appropriately.
|
||||
(**) If you use SUNtar, then it might have already unbinhexed the files
|
||||
in question.
|
||||
(***) The project file was saved with CW Pro 5.3. If you have an earlier
|
||||
version and it refuses to open it, then download
|
||||
http://www.openssl.org/~appro/OpenSSL.mcp.xml and import it
|
||||
overwriting the original OpenSSL.mcp.
|
||||
(****) Other targets are works in progress. If you feel like giving 'em a
|
||||
shot, then you should know that OpenSSL* and Lib* targets are
|
||||
supposed to be built with the GUSI, MacOS library which mimics
|
||||
BSD sockets and some other POSIX APIs. The GUSI distribution is
|
||||
expected to be found in the same directory as the openssl source tree,
|
||||
i.e., in the parent directory to the one where this very file,
|
||||
namely INSTALL.MacOS, resides. For more information about GUSI, see
|
||||
http://www.iis.ee.ethz.ch/~neeri/macintosh/gusi-qa.html
|
||||
|
||||
Finally some essential comments from our generous contributor:-)
|
||||
|
||||
"I've gotten OpenSSL working on the Macintosh. It's probably a bit of a
|
||||
hack, but it works for what I'm doing. If you don't like the way I've done
|
||||
it, then feel free to change what I've done. I freely admit that I've done
|
||||
some less-than-ideal things in my port, and if you don't like the way I've
|
||||
done something, then feel free to change it-- I won't be offended!
|
||||
|
||||
... I've tweaked "bss_sock.c" a little to call routines in a "MacSocket"
|
||||
library I wrote. My MacSocket library is a wrapper around OpenTransport,
|
||||
handling stuff like endpoint creation, reading, writing, etc. It is not
|
||||
designed as a high-performance package such as you'd use in a webserver,
|
||||
but is fine for lots of other applications. MacSocket also uses some other
|
||||
code libraries I've written to deal with string manipulations and error
|
||||
handling. Feel free to use these things in your own code, but give me
|
||||
credit and/or send me free stuff in appreciation! :-)
|
||||
|
||||
...
|
||||
|
||||
If you have any questions, feel free to email me as the following:
|
||||
|
||||
roy@centricsystems.ca
|
||||
|
||||
-Roy Wood"
|
||||
|
@ -192,7 +192,7 @@
|
||||
#include "../crypto/bn/bn_lcl.h"
|
||||
|
||||
#ifndef HAVE_FORK
|
||||
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
|
||||
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
|
||||
# define HAVE_FORK 0
|
||||
# else
|
||||
# define HAVE_FORK 1
|
||||
|
@ -129,7 +129,7 @@
|
||||
#undef SGTTY
|
||||
#endif
|
||||
|
||||
#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE)
|
||||
#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS)
|
||||
#undef TERMIOS
|
||||
#undef TERMIO
|
||||
#define SGTTY
|
||||
@ -165,7 +165,7 @@
|
||||
#define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(MAC_OS_pre_X)
|
||||
#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
@ -186,14 +186,6 @@ struct IOSB {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(MAC_OS_pre_X) || defined(MAC_OS_GUSI_SOURCE)
|
||||
/*
|
||||
* This one needs work. As a matter of fact the code is unoperational
|
||||
* and this is only a trick to get it compiled.
|
||||
* <appro@fy.chalmers.se>
|
||||
*/
|
||||
#define TTY_STRUCT int
|
||||
#endif
|
||||
|
||||
#ifndef NX509_SIG
|
||||
#define NX509_SIG 32
|
||||
@ -294,7 +286,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||
#ifdef OPENSSL_SYS_MSDOS
|
||||
if ((tty=fopen("con","r")) == NULL)
|
||||
tty=stdin;
|
||||
#elif defined(MAC_OS_pre_X) || defined(OPENSSL_SYS_VXWORKS)
|
||||
#elif defined(OPENSSL_SYS_VXWORKS)
|
||||
tty=stdin;
|
||||
#else
|
||||
#ifndef OPENSSL_SYS_MPE
|
||||
|
@ -146,15 +146,6 @@
|
||||
# define ROTATE(a,n) _lrotl(a,n)
|
||||
# elif defined(__ICC)
|
||||
# define ROTATE(a,n) _rotl(a,n)
|
||||
# elif defined(__MWERKS__)
|
||||
# if defined(__POWERPC__)
|
||||
# define ROTATE(a,n) __rlwinm(a,n,0,31)
|
||||
# elif defined(__MC68K__)
|
||||
/* Motorola specific tweak. <appro@fy.chalmers.se> */
|
||||
# define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) )
|
||||
# else
|
||||
# define ROTATE(a,n) __rol(a,n)
|
||||
# endif
|
||||
# elif defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
|
||||
/*
|
||||
* Some GNU C inline assembler templates. Note that these are
|
||||
|
@ -154,13 +154,7 @@ int RAND_poll(void)
|
||||
|
||||
for( i=2; i<ENTROPY_NEEDED; i++)
|
||||
{
|
||||
#ifdef __MWERKS__
|
||||
asm
|
||||
{
|
||||
rdtsc
|
||||
mov tsc, eax
|
||||
}
|
||||
#elif defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
|
||||
#if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
|
||||
asm volatile("rdtsc":"=a"(tsc)::"edx");
|
||||
#endif
|
||||
|
||||
|
@ -94,16 +94,9 @@ static void sha_block_data_order (SHA_CTX *c, const void *p,size_t num);
|
||||
# define HASH_FINAL SHA1_Final
|
||||
# define HASH_INIT SHA1_Init
|
||||
# define HASH_BLOCK_DATA_ORDER sha1_block_data_order
|
||||
# if defined(__MWERKS__) && defined(__MC68K__)
|
||||
/* Metrowerks for Motorola fails otherwise:-( <appro@fy.chalmers.se> */
|
||||
# define Xupdate(a,ix,ia,ib,ic,id) do { (a)=(ia^ib^ic^id); \
|
||||
ix=(a)=ROTATE((a),1); \
|
||||
} while (0)
|
||||
# else
|
||||
# define Xupdate(a,ix,ia,ib,ic,id) ( (a)=(ia^ib^ic^id), \
|
||||
# define Xupdate(a,ix,ia,ib,ic,id) ( (a)=(ia^ib^ic^id), \
|
||||
ix=(a)=ROTATE((a),1) \
|
||||
)
|
||||
# endif
|
||||
|
||||
#ifndef SHA1_ASM
|
||||
static
|
||||
|
@ -202,7 +202,7 @@
|
||||
# undef SGTTY
|
||||
#endif
|
||||
|
||||
#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(MAC_OS_GUSI_SOURCE)
|
||||
#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(MAC_OS_GUSI_SOURCE)
|
||||
# undef TERMIOS
|
||||
# undef TERMIO
|
||||
# define SGTTY
|
||||
@ -244,7 +244,7 @@
|
||||
# define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_SUNOS)
|
||||
#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_SUNOS)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
@ -268,7 +268,7 @@ struct IOSB {
|
||||
typedef int sig_atomic_t;
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE)
|
||||
/*
|
||||
* This one needs work. As a matter of fact the code is unoperational
|
||||
* and this is only a trick to get it compiled.
|
||||
@ -484,7 +484,7 @@ static int open_console(UI *ui)
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_UI);
|
||||
is_a_tty = 1;
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS)
|
||||
#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS)
|
||||
tty_in=stdin;
|
||||
tty_out=stderr;
|
||||
#else
|
||||
|
28
e_os.h
28
e_os.h
@ -94,20 +94,6 @@ extern "C" {
|
||||
# define NO_SYSLOG
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
|
||||
# if macintosh==1
|
||||
# ifndef MAC_OS_GUSI_SOURCE
|
||||
# define MAC_OS_pre_X
|
||||
# define NO_SYS_TYPES_H
|
||||
# endif
|
||||
# define NO_SYS_PARAM_H
|
||||
# define NO_CHMOD
|
||||
# define NO_SYSLOG
|
||||
# undef DEVRANDOM
|
||||
# define GETPID_IS_MEANINGLESS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/********************************************************************
|
||||
The Microsoft section
|
||||
********************************************************************/
|
||||
@ -157,12 +143,6 @@ extern "C" {
|
||||
#define closesocket(s) close_s(s)
|
||||
#define readsocket(s,b,n) read_s(s,b,n)
|
||||
#define writesocket(s,b,n) send(s,b,n,0)
|
||||
#elif defined(MAC_OS_pre_X)
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
#define closesocket(s) MacSocket_close(s)
|
||||
#define readsocket(s,b,n) MacSocket_recv((s),(b),(n),true)
|
||||
#define writesocket(s,b,n) MacSocket_send((s),(b),(n))
|
||||
#elif defined(OPENSSL_SYS_VMS)
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
@ -546,14 +526,6 @@ static unsigned int _strlen31(const char *str)
|
||||
# define SHUTDOWN2(fd) close_s(fd)
|
||||
# endif
|
||||
|
||||
# elif defined(MAC_OS_pre_X)
|
||||
|
||||
# include "MacSocket.h"
|
||||
# define SSLeay_Write(a,b,c) MacSocket_send((a),(b),(c))
|
||||
# define SSLeay_Read(a,b,c) MacSocket_recv((a),(b),(c),true)
|
||||
# define SHUTDOWN(fd) MacSocket_close(fd)
|
||||
# define SHUTDOWN2(fd) MacSocket_close(fd)
|
||||
|
||||
# elif defined(OPENSSL_SYS_NETWARE)
|
||||
/* NetWare uses the WinSock2 interfaces by default, but can be configured for BSD
|
||||
*/
|
||||
|
14
e_os2.h
14
e_os2.h
@ -70,12 +70,6 @@ extern "C" {
|
||||
|
||||
#define OPENSSL_SYS_UNIX
|
||||
|
||||
/* ----------------------- Macintosh, before MacOS X ----------------------- */
|
||||
#if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_MACINTOSH_CLASSIC
|
||||
#endif
|
||||
|
||||
/* ----------------------- NetWare ----------------------------------------- */
|
||||
#if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
@ -177,10 +171,6 @@ extern "C" {
|
||||
# ifdef OPENSSL_SYSNAME_MACOSX
|
||||
# define OPENSSL_SYS_MACOSX
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY
|
||||
# define OPENSSL_SYS_MACOSX_RHAPSODY
|
||||
# define OPENSSL_SYS_MACOSX
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_SUNOS
|
||||
# define OPENSSL_SYS_SUNOS
|
||||
#endif
|
||||
@ -289,10 +279,6 @@ extern "C" {
|
||||
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE)
|
||||
# define ossl_ssize_t long
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_MSDOS
|
||||
# define ossl_ssize_t long
|
||||
#endif
|
||||
|
@ -37,8 +37,6 @@ typedef unsigned long SW_U32; /* 32 bit integer */
|
||||
SW_U32 low32;
|
||||
SW_U32 high32;
|
||||
} SW_U64; /* 64 bit integer */
|
||||
#elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
|
||||
typedef longlong SW_U64
|
||||
#else /* Unix variants */
|
||||
typedef struct _SW_U64 {
|
||||
SW_U32 low32;
|
||||
@ -161,16 +159,6 @@ typedef struct _SW_LARGENUMBER {
|
||||
typedef HANDLE SW_OSHANDLE; /* handle to kernel object */
|
||||
#define SW_OS_INVALID_HANDLE INVALID_HANDLE_VALUE
|
||||
#define SW_CALLCONV _stdcall
|
||||
#elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
|
||||
/* async callback mechanisms */
|
||||
/* swiftCallbackLevel */
|
||||
#define SW_MAC_CALLBACK_LEVEL_NO 0
|
||||
#define SW_MAC_CALLBACK_LEVEL_HARDWARE 1 /* from the hardware ISR */
|
||||
#define SW_MAC_CALLBACK_LEVEL_SECONDARY 2 /* as secondary ISR */
|
||||
typedef int SW_MAC_CALLBACK_LEVEL;
|
||||
typedef int SW_OSHANDLE;
|
||||
#define SW_OS_INVALID_HANDLE (-1)
|
||||
#define SW_CALLCONV
|
||||
#else /* Unix variants */
|
||||
typedef int SW_OSHANDLE; /* handle to driver */
|
||||
#define SW_OS_INVALID_HANDLE (-1)
|
||||
|
@ -2083,11 +2083,9 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
|
||||
int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *file);
|
||||
#ifndef OPENSSL_SYS_VMS
|
||||
#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
|
||||
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *dir);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user