diff -r -U3 openssl-0.9.6c-orig/Configure openssl-0.9.6c/Configure --- openssl-0.9.6c-orig/Configure Thu Dec 6 13:11:39 2001 +++ openssl-0.9.6c/Configure Fri Jan 4 01:07:37 2002 @@ -475,7 +475,7 @@ ##### MacOS X (a.k.a. Rhapsody or Darwin) setup "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", -"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", +"darwin-ppc-cc","cc:-O3 -D_DARWIN -DB_ENDIAN::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", ##### Sony NEWS-OS 4.x "newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", diff -r -U3 openssl-0.9.6c-orig/Makefile.org openssl-0.9.6c/Makefile.org --- openssl-0.9.6c-orig/Makefile.org Wed Nov 14 10:44:11 2001 +++ openssl-0.9.6c/Makefile.org Fri Jan 4 00:55:04 2002 @@ -269,6 +269,17 @@ [ -n "$$my_ld" ] && \ $$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1 +# For Darwin AKA Mac OS/X (dyld) +do_darwin-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \ + lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \ + -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ + libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \ + echo "" ; \ + done + # This assumes that GNU utilities are *not* used do_alpha-osf1-shared: if ${DETECT_GNU_LD}; then \ diff -r -U3 openssl-0.9.6c-orig/apps/s_time.c openssl-0.9.6c/apps/s_time.c --- openssl-0.9.6c-orig/apps/s_time.c Fri Feb 11 09:46:55 2000 +++ openssl-0.9.6c/apps/s_time.c Thu Jan 3 22:50:27 2002 @@ -82,7 +82,7 @@ #include "wintext.h" #endif -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN) #define TIMES #endif diff -r -U3 openssl-0.9.6c-orig/apps/speed.c openssl-0.9.6c/apps/speed.c --- openssl-0.9.6c-orig/apps/speed.c Wed Apr 11 11:06:44 2001 +++ openssl-0.9.6c/apps/speed.c Thu Jan 3 22:49:20 2002 @@ -84,10 +84,10 @@ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define USE_TOD -#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined(_DARWIN) # define TIMES #endif -#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) +#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) # define TIMEB #endif diff -r -U3 openssl-0.9.6c-orig/crypto/asn1/a_gentm.c openssl-0.9.6c/crypto/asn1/a_gentm.c --- openssl-0.9.6c-orig/crypto/asn1/a_gentm.c Thu Jun 1 23:16:27 2000 +++ openssl-0.9.6c/crypto/asn1/a_gentm.c Fri Jan 4 00:57:23 2002 @@ -203,7 +203,7 @@ if (s == NULL) return(NULL); -#if defined(THREADS) && !defined(WIN32) +#if defined(THREADS) && !defined(WIN32) && ! defined(_DARWIN) gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; #else diff -r -U3 openssl-0.9.6c-orig/crypto/asn1/a_time.c openssl-0.9.6c/crypto/asn1/a_time.c --- openssl-0.9.6c-orig/crypto/asn1/a_time.c Sat Sep 9 05:45:18 2000 +++ openssl-0.9.6c/crypto/asn1/a_time.c Thu Jan 3 22:54:29 2002 @@ -113,7 +113,7 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) { struct tm *ts; -#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) struct tm data; gmtime_r(&t,&data); diff -r -U3 openssl-0.9.6c-orig/crypto/asn1/a_utctm.c openssl-0.9.6c/crypto/asn1/a_utctm.c --- openssl-0.9.6c-orig/crypto/asn1/a_utctm.c Sat Sep 9 05:45:18 2000 +++ openssl-0.9.6c/crypto/asn1/a_utctm.c Thu Jan 3 22:54:54 2002 @@ -203,7 +203,7 @@ if (s == NULL) return(NULL); -#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; #else @@ -286,7 +286,7 @@ t -= offset*60; /* FIXME: may overflow in extreme cases */ -#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) { struct tm data; gmtime_r(&t, &data); tm = &data; } #else tm = gmtime(&t); diff -r -U3 openssl-0.9.6c-orig/crypto/des/fcrypt.c openssl-0.9.6c/crypto/des/fcrypt.c --- openssl-0.9.6c-orig/crypto/des/fcrypt.c Sun Mar 19 02:10:16 2000 +++ openssl-0.9.6c/crypto/des/fcrypt.c Thu Jan 3 23:10:57 2002 @@ -61,7 +61,7 @@ void fcrypt_body(DES_LONG *out,des_key_schedule ks, DES_LONG Eswap0, DES_LONG Eswap1); -#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) +#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(_DARWIN) char *crypt(const char *buf, const char *salt) { return(des_crypt(buf, salt));