I recently tried to build the August 9th snapshot of openssl 0.9.7 on
a sun sparc machine running sunos 4.1.3_U1. This failed in several
areas. Here are the changes I made to allow it to compile, but I am
not sure that these are the correct fixes. The main problems: this
version of sunos doesn't have strtoul and doesn't define sig_atomic_t
anywhere. Also <sys/ioctl.h> should not be included in ui_openssl.c.
I wasn't sure which define to use to identify this version of sunos.
I presume that these changes don't apply to Solaris, but I don't have
a Solaris machine available to me to check. This patch uses (sun).
The choices defined by gcc are: "-Dsparc -Dsun -D__sparc__ -D__sun__
-D__sparc -D__sun". Is one of these more appropriate for the patch?
Is defining strtoul as (unsigned long)strtol acceptable for the one
place in the code where this function is used, or does a strtoul
function have to be written to be used here? I know that there is
a GNU strtoul that is used with their autoconfigure mechanism when
strtoul is not available, but I don't think we can use that because
of the differing licenses. I haven't checked for other strtoul
implementations that don't have licensing restrictions, and can't
write one myself.
With this patch, make and "make test" run without problems (using GNU
bc for the test).
Because of long lines, I am attaching the patch rather than including
it here in the message.
Doug
__
Doug Kaufman
Internet: [EMAIL PROTECTED]
--- openssl-0.9.7-beta3/crypto/ocsp/ocsp_ht.c.orig Fri Jan 12 06:45:12 2001
+++ openssl-0.9.7-beta3/crypto/ocsp/ocsp_ht.c Tue Aug 13 08:08:29 2002
@@ -64,6 +64,9 @@
#include <openssl/ocsp.h>
#include <openssl/err.h>
#include <openssl/buffer.h>
+#ifdef sun
+#define strtoul (unsigned long)strtol
+#endif /* sun */
/* Quick and dirty HTTP OCSP request handler.
* Could make this a bit cleverer by adding
--- openssl-0.9.7-beta3/crypto/ui/ui_openssl.c.orig Thu Jun 13 14:06:50 2002
+++ openssl-0.9.7-beta3/crypto/ui/ui_openssl.c Mon Aug 12 23:49:16 2002
@@ -221,7 +221,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)
+#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) &&
+!defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(sun)
# include <sys/ioctl.h>
#endif
@@ -239,6 +239,10 @@
short iosb$w_count;
long iosb$l_info;
};
+#endif
+
+#ifdef sun
+ typedef int sig_atomic_t;
#endif
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE)