Re: Macintosh Port diffs

1999-09-04 Thread Bodo Moeller

Andy Polyakov [EMAIL PROTECTED]:

 -#include sys/types.h
 -#include sys/stat.h
 +
 +#ifndef macintosh
 +#  include sys/types.h
 +#  include sys/stat.h
 +#endif

 [...] I'd suggest to replace #ifdef macintosh with #ifdef MAC_OS

 Maybe MAC_OS is not quite an appropriate symbol,
 Maybe... How about MAC_OS_pre_X then?
 as things change with MacOS X.
 Do they:-) Did you know that it comes without X11?

Sure.  But it comes with sys/types.h and sys/stat.h, which is what
these patches are about.  (Also it comes with built-in deadlocks --
if you believe the package design: The toothed wheels are so arranged
that they cannot turn at all because between pairs of neighbouring large
wheels there's often a small one that touches both, meaning that it would
have to turn clockwise and counterclockwise at the same time if the
large wheels were moved.)
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Macintosh Port diffs

1999-09-03 Thread Bodo Moeller

Andy Polyakov [EMAIL PROTECTED]:

 -#include sys/types.h
 -#include sys/stat.h
 +
 +#ifndef macintosh
 +#  include sys/types.h
 +#  include sys/stat.h
 +#endif

 [...] I'd suggest to replace #ifdef macintosh with #ifdef MAC_OS
 and put something like following into e_os.h:

 #if defined(__MWERKS__)  defined(macintosh)
 # if macintosh==1
 #  define MAC_OS
 # endif
 #endif

Maybe MAC_OS is not quite an appropriate symbol, as things change
with MacOS X.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Macintosh Port diffs

1999-09-03 Thread Rich Salz

  and put something like following into e_os.h:
 
  #if defined(__MWERKS__)  defined(macintosh)
  # if macintosh==1
  #  define MAC_OS
  # endif
  #endif

That is a very bad way to do things.

Use feature tests in your code -- HAVE_SYS_TIME, HAVE_STRCASECMP,
etc.  Then in a single place (like e_os.h), test on the platform
and set the feature macros.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Macintosh Port diffs

1999-09-02 Thread Roy Wood

Okay, as a first step toward getting my Mac changes into OpenSSL, here 
are the diffs I've made wrt to clean 0.9.4 install.

Next, I'm packaging up some notes and code for Mac people who are 
interested in using OpenSSL.  Is there an FTP drop box I can place these? 
 It'll be a little large for emailing to the list

The other question is what sort of legal mumbo jumbo I ought to put at 
the start of my Mac code files.  I'd like to make my code as free as 
OpenSSL.  Any thoughts, folks?


Anyway, here are the diffs.  They're really not as significant as they 
seem--  there are a bunch of diffs here just because I indented some 
other code when I added #ifdef's.


-Roy



Only in openssl-0.9.4: Makefile
Only in openssl-0.9.4/apps: Makefile
Only in openssl-0.9.4/apps: md5.c
Only in openssl-0.9.4/apps: rmd160.c
Only in openssl-0.9.4/crypto: Makefile
Only in openssl-0.9.4/crypto/asn1: Makefile
diff -u -r openssl-0.9.4/crypto/asn1/a_digest.c 
openssl-0.9.4.Macintosh/crypto/asn1/a_digest.c
--- openssl-0.9.4/crypto/asn1/a_digest.cSun Aug  8 07:25:31 1999
+++ openssl-0.9.4.Macintosh/crypto/asn1/a_digest.c  Mon Aug 23 06:24:05 
1999
@@ -58,8 +58,11 @@
 
 #include stdio.h
 #include time.h
-#include sys/types.h
-#include sys/stat.h
+
+#ifndef macintosh
+#  include sys/types.h
+#  include sys/stat.h
+#endif
 
 #include "cryptlib.h"
 #include openssl/evp.h
diff -u -r openssl-0.9.4/crypto/asn1/a_sign.c 
openssl-0.9.4.Macintosh/crypto/asn1/a_sign.c
--- openssl-0.9.4/crypto/asn1/a_sign.c  Fri Apr 23 18:08:08 1999
+++ openssl-0.9.4.Macintosh/crypto/asn1/a_sign.cMon Aug 23 06:24:24 1999
@@ -58,8 +58,11 @@
 
 #include stdio.h
 #include time.h
-#include sys/types.h
-#include sys/stat.h
+
+#ifndef macintosh
+#  include sys/types.h
+#  include sys/stat.h
+#endif
 
 #include "cryptlib.h"
 #include openssl/bn.h
diff -u -r openssl-0.9.4/crypto/asn1/a_verify.c 
openssl-0.9.4.Macintosh/crypto/asn1/a_verify.c
--- openssl-0.9.4/crypto/asn1/a_verify.cFri Apr 23 18:08:08 1999
+++ openssl-0.9.4.Macintosh/crypto/asn1/a_verify.c  Mon Aug 23 06:24:34 
1999
@@ -58,8 +58,11 @@
 
 #include stdio.h
 #include time.h
-#include sys/types.h
-#include sys/stat.h
+
+#ifndef macintosh
+#  include sys/types.h
+#  include sys/stat.h
+#endif
 
 #include "cryptlib.h"
 #include openssl/bn.h
Only in openssl-0.9.4/crypto/bf: Makefile
Only in openssl-0.9.4/crypto/bio: Makefile
diff -u -r openssl-0.9.4/crypto/bio/bss_sock.c 
openssl-0.9.4.Macintosh/crypto/bio/bss_sock.c
--- openssl-0.9.4/crypto/bio/bss_sock.c Mon Apr 26 12:40:58 1999
+++ openssl-0.9.4.Macintosh/crypto/bio/bss_sock.c   Mon Aug 23 07:26:28 1999
@@ -60,7 +60,13 @@
 
 #include stdio.h
 #include errno.h
-#define USE_SOCKETS
+
+#ifndef macintosh
+   #define USE_SOCKETS
+#else
+   #include "MacSocket.h"
+#endif
+
 #include "cryptlib.h"
 #include openssl/bio.h
 
@@ -163,8 +169,12 @@
if (a-init)
{
 #ifndef BIO_FD
+   #ifndef macintosh
shutdown(a-num,2);
closesocket(a-num);
+   #else
+   MacSocket_close(a-num);
+   #endif
 #else  /* BIO_FD */
close(a-num);
 #endif
@@ -188,7 +198,15 @@
{
 #ifndef BIO_FD
clear_socket_error();
+   
+   #ifndef macintosh
ret=readsocket(b-num,out,outl);
+   #else
+   if (MacSocket_recv(b-num,out,outl,ret,true))
+   {
+   ret = errno;
+   }
+   #endif
 #else
clear_sys_error();
ret=read(b-num,out,outl);
@@ -217,7 +235,17 @@

 #ifndef BIO_FD
clear_socket_error();
-   ret=writesocket(b-num,in,inl);
+
+   #ifndef macintosh
+   ret=writesocket(b-num,in,inl);
+   #else
+   {
+   if (MacSocket_send(b-num,in,inl,ret))
+   {
+   ret = errno;
+   }
+   }
+   #endif
 #else
clear_sys_error();
ret=write(b-num,in,inl);
Only in openssl-0.9.4/crypto/bn: Makefile
Only in openssl-0.9.4/crypto/buffer: Makefile
Only in openssl-0.9.4/crypto/cast: Makefile
Only in openssl-0.9.4/crypto/comp: Makefile
Only in openssl-0.9.4/crypto/conf: Makefile
Only in openssl-0.9.4/crypto/des: Makefile
Only in openssl-0.9.4/crypto/des/asm: perlasm
diff -u -r openssl-0.9.4/crypto/des/enc_read.c 
openssl-0.9.4.Macintosh/crypto/des/enc_read.c
--- openssl-0.9.4/crypto/des/enc_read.c Sun May 16 08:25:45 1999
+++ openssl-0.9.4.Macintosh/crypto/des/enc_read.c   Mon Aug 23 06:26:46 1999
@@ -147,7 +147,7 @@
/* first - get the length */
while (net_num  HDRSIZE) 
{
-   i=read(fd,(net[net_num]),HDRSIZE-net_num);
+   i=read(fd,(char *) (net[net_num]),HDRSIZE-net_num);
 #ifdef EINTR
if ((i == -1)  (errno == EINTR)) continue;
 #endif
@@ -169,7 +169,7 @@
net_num=0;