From: Rich Salz Date: Wed, 24 Sep 2014 16:18:19 +0000 (-0400) Subject: RT3544: Remove MWERKS support X-Git-Tag: master-post-reformat~365 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=92c78463720f71e47c251ffa58493e32cd793e13;hp=4aac102f75b517bdb56b1bcfd0a856052d559f6e 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 --- diff --git a/Configure b/Configure index 4b925e9788..4bbc61fb7a 100755 --- a/Configure +++ b/Configure @@ -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", diff --git a/INSTALL.MacOS b/INSTALL.MacOS deleted file mode 100644 index 01c60d81f9..0000000000 --- a/INSTALL.MacOS +++ /dev/null @@ -1,72 +0,0 @@ -OpenSSL - Port To The Macintosh OS 9 or Earlier -=============================================== - -Thanks to Roy Wood 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" - diff --git a/apps/speed.c b/apps/speed.c index b37b49329b..85786f1ca7 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -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 diff --git a/crypto/des/read_pwd.c b/crypto/des/read_pwd.c index ce5fa00a37..7e3f9020dc 100644 --- a/crypto/des/read_pwd.c +++ b/crypto/des/read_pwd.c @@ -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 #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. - * - */ -#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 diff --git a/crypto/md32_common.h b/crypto/md32_common.h index 1b84104354..16f363a582 100644 --- a/crypto/md32_common.h +++ b/crypto/md32_common.h @@ -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. */ -# 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 diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c index 17c1ea71db..9239a72dae 100644 --- a/crypto/rand/rand_nw.c +++ b/crypto/rand/rand_nw.c @@ -154,13 +154,7 @@ int RAND_poll(void) for( i=2; i=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 diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h index ecbfcf100c..0baeb0fe17 100644 --- a/crypto/sha/sha_locl.h +++ b/crypto/sha/sha_locl.h @@ -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:-( */ -# 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 diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index a38c7581e6..6d4c4e147d 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -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 #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 diff --git a/e_os.h b/e_os.h index 27b18256b6..64dd3d2e74 100644 --- a/e_os.h +++ b/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 */ diff --git a/e_os2.h b/e_os2.h index f4597a2c67..bbb2ab64d2 100644 --- a/e_os2.h +++ b/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 diff --git a/engines/vendor_defns/cswift.h b/engines/vendor_defns/cswift.h index 60079326bb..74c8b1dfb5 100644 --- a/engines/vendor_defns/cswift.h +++ b/engines/vendor_defns/cswift.h @@ -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) diff --git a/ssl/ssl.h b/ssl/ssl.h index a1a3e13954..8eb8431c35 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -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