DJGPP update.
authorAndy Polyakov <appro@openssl.org>
Tue, 4 Jan 2005 10:28:38 +0000 (10:28 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 4 Jan 2005 10:28:38 +0000 (10:28 +0000)
PR: 989
Submitted by: Doug Kaufman

Configure
TABLE
apps/s_client.c
apps/s_socket.c
crypto/rand/rand_unix.c

index 4ea2d09..c13a414 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -502,7 +502,7 @@ my %table=(
 "netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall::::${x86_gcc_opts}:::",
 
 # DJGPP
-"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
+"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
 
 # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 "ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
@@ -1540,7 +1540,6 @@ EOF
        } else {
            # No path for Perl known ...
            &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
-           &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
            &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
        }
        if ($depflags ne "" && !$make_depend) {
diff --git a/TABLE b/TABLE
index 4d9bbab..581be6a 100644 (file)
--- a/TABLE
+++ b/TABLE
@@ -137,7 +137,7 @@ $arflags      =
 
 *** DJGPP
 $cc           = gcc
-$cflags       = -I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall
+$cflags       = -I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM="/dev/urandom\x24"
 $unistd       = 
 $thread_cflag = 
 $sys_id       = MSDOS
index c1fcd9d..2f233da 100644 (file)
@@ -200,6 +200,9 @@ static void sc_usage(void)
        BIO_printf(bio_err," -pause        - sleep(1) after each read(2) and write(2) system call\n");
        BIO_printf(bio_err," -showcerts    - show all certificates in the chain\n");
        BIO_printf(bio_err," -debug        - extra output\n");
+#ifdef WATT32
+       BIO_printf(bio_err," -wdebug       - WATT-32 tcp debugging\n");
+#endif
        BIO_printf(bio_err," -msg          - Show protocol messages\n");
        BIO_printf(bio_err," -nbio_test    - more ssl protocol testing\n");
        BIO_printf(bio_err," -state        - print the 'ssl' states\n");
@@ -360,6 +363,10 @@ int MAIN(int argc, char **argv)
                        c_Pause=1;
                else if (strcmp(*argv,"-debug") == 0)
                        c_debug=1;
+#ifdef WATT32
+               else if (strcmp(*argv,"-wdebug") == 0)
+                       dbug_init();
+#endif
                else if (strcmp(*argv,"-msg") == 0)
                        c_msg=1;
                else if (strcmp(*argv,"-showcerts") == 0)
index 28c6b1e..45014fa 100644 (file)
@@ -172,7 +172,6 @@ static int ssl_sock_init(void)
 #ifdef WATT32
        extern int _watt_do_exit;
        _watt_do_exit = 0;
-       dbug_init();
        if (sock_init())
                return (0);
 #elif defined(OPENSSL_SYS_WINDOWS)
index d2fdb35..abdab86 100644 (file)
@@ -168,7 +168,13 @@ int RAND_poll(void)
 
        for (randomfile = randomfiles; *randomfile && n < ENTROPY_NEEDED; randomfile++)
                {
-               if ((fd = open(*randomfile, O_RDONLY|O_NONBLOCK
+               if ((fd = open(*randomfile, O_RDONLY
+#ifdef O_NONBLOCK
+                       |O_NONBLOCK
+#endif
+#ifdef O_BINARY
+                       |O_BINARY
+#endif
 #ifdef O_NOCTTY /* If it happens to be a TTY (god forbid), do not make it
                   our controlling tty */
                        |O_NOCTTY