BleedingEdgeNTOpenDevSSLers -
Here are a handful of minor fixes I had to make to feed 0.9.3 through
VC 6.0. To get to this point, I followed the instructions in INSTALL.W32
and tried building nt.mak (e.g. perl Configure VC-WIN32, then ms\do_ms,
then nmake -f ms\nt.mak). All diffs are <old> vs. <new>.
1) crypto/des/read_pwd.c: don't try to #include <unistd.h>.
MSDOS doesn't seem to be #defined, but WINDOWS is:
E:\>diff -c Temp/crypto/des/read_pwd.c OpenSSL-0.9.3/crypto/des/read_pwd.c
*** Temp/crypto/des/read_pwd.c Sat Apr 10 10:17:16 1999
--- OpenSSL-0.9.3/crypto/des/read_pwd.c Wed Apr 14 10:27:10 1999
***************
*** 56,62 ****
* [including the GNU Public Licence.]
*/
! #if !defined(MSDOS) && !defined(VMS)
#include <unistd.h>
/* If unistd.h defines _POSIX_VERSION, we conclude that we
* are on a POSIX system and have sigaction and termios. */
--- 56,62 ----
* [including the GNU Public Licence.]
*/
! #if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
#include <unistd.h>
/* If unistd.h defines _POSIX_VERSION, we conclude that we
* are on a POSIX system and have sigaction and termios. */
2) ssl/ssl_ciph.c uses the typesafe STACK "new" method, for
which VC 6.0 really, really wants a new-style prototype. The
"old" style function declaration just isn't enough for these
modern compilers:
E:\>diff -c Temp/ssl/ssl_ciph.c OpenSSL-0.9.3/ssl/ssl_ciph.c
*** Temp/ssl/ssl_ciph.c Mon Apr 12 18:17:42 1999
--- OpenSSL-0.9.3/ssl/ssl_ciph.c Wed Apr 14 11:03:08 1999
***************
*** 812,818 ****
return(NULL);
}
! static int sk_comp_cmp(a,b)
SSL_COMP **a,**b;
{
return((*a)->id-(*b)->id);
--- 812,822 ----
return(NULL);
}
! #ifndef NOPROTO
! static int sk_comp_cmp(SSL_COMP **a,SSL_COMP **b);
! #endif
!
! static int sk_comp_cmp(a,b)
SSL_COMP **a,**b;
{
return((*a)->id-(*b)->id);
***************
*** 834,840 ****
comp->id=id;
comp->method=cm;
if (ssl_comp_methods == NULL)
! sk=ssl_comp_methods=sk_SSL_COMP_new(sk_comp_cmp);
else
sk=ssl_comp_methods;
if ((sk == NULL) || !sk_SSL_COMP_push(sk,comp))
--- 838,844 ----
comp->id=id;
comp->method=cm;
if (ssl_comp_methods == NULL)
! sk=ssl_comp_methods=sk_SSL_COMP_new(sk_comp_cmp);
else
sk=ssl_comp_methods;
if ((sk == NULL) || !sk_SSL_COMP_push(sk,comp))
3) apps/s_client.c got an #ifdef WINDOWS and '{' bracket swapped
around. This makes the compiler very sad.
E:\>diff -c Temp/apps/s_client.c OpenSSL-0.9.3/apps/s_client.c
*** Temp/apps/s_client.c Mon Apr 12 14:17:56 1999
--- OpenSSL-0.9.3/apps/s_client.c Wed Apr 14 11:08:04 1999
***************
*** 442,449 ****
ssl_pending = read_ssl && SSL_pending(con);
if (!ssl_pending)
- #ifndef WINDOWS
{
if (tty_on)
{
if (read_tty) FD_SET(fileno(stdin),&readfds);
--- 442,449 ----
ssl_pending = read_ssl && SSL_pending(con);
if (!ssl_pending)
{
+ #ifndef WINDOWS
if (tty_on)
{
if (read_tty) FD_SET(fileno(stdin),&readfds);
4) The apps directory needs a copy of bss_file.c, which lives in
crypto/bio. This is the kind of thing you handle with a symlink
on Unix but which you need a copy in a bat script for on NT:
E:\>cp crypto/bio/bss_file.c apps
5) The setsockopt call in apps/s_socket needs a typecast:
E:\>diff -c Temp/apps/s_socket.c OpenSSL-0.9.3/apps/s_socket.c
*** Temp/apps/s_socket.c Sat Apr 3 09:17:12 1999
--- OpenSSL-0.9.3/apps/s_socket.c Wed Apr 14 11:15:18 1999
***************
*** 345,351 ****
#if defined SOL_SOCKET && defined SO_REUSEADDR
{
int j = 1;
! setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &j, sizeof j);
}
#endif
if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
--- 345,351 ----
#if defined SOL_SOCKET && defined SO_REUSEADDR
{
int j = 1;
! setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*)&j, sizeof j);
}
#endif
if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
TT
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]