On 6 June 2002, Richard Levitte wrote:
> 
> [[EMAIL PROTECTED] - Tue Jun  4 19:47:25 2002]:
> 
> OK, I've a few comments:
> 
> > --- openssl-0.9.7/Configure.orig    2002-05-30 
> 10:08:08.000000000 -0800
> > +++ openssl-0.9.7/Configure 2002-06-02 15:23:38.000000000 -0800
> > @@ -513,6 +513,9 @@
> >  "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer 
> -O3
> > -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des}
> > ${x86_gcc_opts}::::::::::win32",
> >  "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486
> > -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des}
> > ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
> > 
> > +# DJGPP
> > +"DJGPP", "gcc:-I/dev/env/DJDIR/watt32/inc -DTERMIOS -DL_ENDIAN
> > -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/DJDIR/watt32/lib
> > -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
> > +
> 
> Since install.djgpp says something about $DJDIR, shouldn't 
> /dev/env/DJDIR be replaced with $ENV{DJDIR}?  Could you check that 
> it works correctly if you make such a change?

It works, but the "/dev/env" form is now the preferred form, probably
because it causes fewer problems with unix scripts. I changed
install.dj instead. Anyone compiling for DJGPP should be aware that
the pseudo-dirctory "/dev/env" automagically gets the environment
variable.
  
> [...]
> > @@ -1226,6 +1230,50 @@
> >  close(IN);
> >  close(OUT);
> > 
> > +my $dir;
> > +my $crypt1;
> > +my $crypt2;
> > +my $crypt3;
> > +my $crypt4;
> > +my $crypt5;
> > +my $crypt6;
> > +my $symlink_exists;
> > +mkdir ('include/openssl', 0777) unless -d 'include/openssl';
> > +$symlink_exists=eval {symlink("",""); 1};
> > +foreach $dir (@skip) {
> > +    $crypt1=join('','crypto/', "$dir", '/', "$dir", 'test.c');
> > +    $crypt2=join('', 'test/', "$dir", 'test.c');
> > +    $crypt3=join('', '../', "$crypt1");
> > +    $crypt4=join('', 'crypto/', "$dir", '/', "$dir", '.h');
> > +    $crypt5=join('', 'include/openssl/', "$dir", '.h');
> > +    $crypt6=join('', '../../', "$crypt4");
> > +    if ($symlink_exists) {
> > +    unlink "$crypt2";
> > +    unlink "$crypt5";
> > +    symlink("$crypt3", "$crypt2");
> > +    symlink("$crypt6", "$crypt5");
> > +    } else {
> > +    open (OLD, "<$crypt1") or die "Can't open $crypt1\n";
> > +    open (NEW, ">$crypt2") or die "Can't open $crypt2\n";
> > +    open (OLD1, "<$crypt4") or die "Can't open $crypt4\n";
> > +    open (NEW1, ">$crypt5") or die "Can't open $crypt5\n";
> > +    binmode(OLD);
> > +    binmode(NEW);
> > +    while (<OLD>) {
> > +    (print NEW $_);
> > +    }
> > +    binmode(OLD1);
> > +    binmode(NEW1);
> > +    while (<OLD1>) {
> > +    (print NEW1 $_);
> > +    }
> > +    close (OLD);
> > +    close (NEW);
> > +    close (OLD1);
> > +    close (NEW1);
> > +    }
> > +    }
> > +
> 
> No, no, no and no.  I will not do that.  Sorry, all I see with that 
> is a maintainance nightmare.

Well, I can tell that this isn't the way you would fix the problem,
but I am not sure which part of the code is the problem. I don't see
where there would be a maintenance problem with this. Let me try to
recap the problem and what I tried to do to fix it. Perhaps someone
can come up with an acceptable solution.

The header files and test files for the different crypto algorithms
are distributed in appropritate subdirectories of crypto, but are
referenced from the include/openssl and test directories respectively.
Links to these files are made by "make links" which is run by the
Configure script. This, in turn, depends on the Makefile in each
subdirectory. When an algorithm is excluded at configure time, the
Makefile in that algorithm's directory is not created, and 
"Make links" is not run.

The header files for the excluded algorithms are not required by any
of the compiled files, but the compilation stops because they are
listed as dependencies (at least in crypto/evp/Makefile). I see three
ways that the "include" problem could be solved. Running "make depend"
takes care of this. Removing the header files as dependencies in
the Makefile should work. I chose to copy the header files for the
excluded directories into include/openssl. That way any changes in
the header files will cause the ".c" file to be recompiled, but the
overhead of running "make depend" is avoided.

The test files for each excluded algorithm are still called by
test/Makefile. Running "make depend" does not fix this problem. The
test files are all designed to print "No [algorithm] support" if the
algorithm was excluded at configure time. I see two possible fixes.
One would be to alter test/Makefile in the Configure script, so that
it no longer calls the testfiles for excluded algoritihms. With this
solution, "make test" would no longer give the warning that the
algorithms were excluded. The warning seemed like a good safety check
to me. I chose to copy the testfiles for the excluded algorithms to
the test directory.

I don't really care how the files are put into the proper directories.
The code I submitted makes symbolic links if they are supported,
and otherwise copies the files. This is how the files are treated
during "make links" in the Configure script. I copied the files using
perl functions, but you could certainly use a system call to "cp".
The symbolic links need different relative paths to the files than
does "cp" so I don't see the code simplified very much. The list of
excluded algorithms is kept in "@skip" in Configure.

I am attaching a modified patch that uses "cp" instead of perl code to
copy the files and which used the "/dev/env" notation for environment
variables for DJGPP. Please let me know which part of the code causes
the "No, no, no and no". I am attaching the patch, rather than
appending, since otherwise the long lines won't be preserved properly
in the mailing list archives.

> However, I did ask on openssl-dev, just a moment ago, if the 
> automagic 'make depend' should be reenabled.  Could you test that 
> such an option works properly?

"Make depend" works on DJGPP.

> > --- openssl-0.9.7/util/mklink.pl.orig       Wed Apr  4 15:50:22 2001
> > +++ openssl-0.9.7/util/mklink.pl    Thu Apr 18 18:42:26 2002
> > @@ -18,10 +18,10 @@
> >  my $from = shift;
> >  my @files = @ARGV;
> > 
> > -my @from_path = split(/\//, $from);
> > +my @from_path = split(/[\\\/]/, $from);
> >  my $pwd = `pwd`;
> >  chop($pwd);
> > -my @pwd_path = split(/\//, $pwd);
> > +my @pwd_path = split(/[\\\/]/, $pwd);
> > 
> >  my @to_path = ();
> > 
> > @@ -52,9 +52,18 @@
> >  foreach $file (@files) {
> >      my $err = "";
> >      if ($symlink_exists) {
> > +    unlink "$from/$file";
> >     symlink("$to/$file", "$from/$file") or $err = " [$!]";
> >      } else {
> > -   system ("cp", "$file", "$from/$file") and $err = " [$!]";
> > +    open (OLD, "<$file") or die "Can't open $file: $!";
> > +    open (NEW, ">$from/$file") or die "Can't open $from/$file: 
> $!";
> > +    binmode(OLD);
> > +    binmode(NEW);
> > +    while (<OLD>) {
> > +    (print NEW $_);
> > +    }
> > +    close (OLD) or die "Can't close $file: $!";
> > +    close (NEW) or die "Can't close $from/$file: $!";
> >      }
> >      print $file . " => $from/$file$err\n";
> >  }
> 
> I don't remember our conversation on this, so bear with me: does the 
> call to cp not work?  If it does, is this really necessary?

The call to "cp" does work. Unarchiving the tar.gz file can cause zero
byte files to be created. I don't see that with the current snapshot,
but it was a problem with previous releases, which had symbolic links
in the tar.gz file. I think it would be safest to include the line
to 'unlink "$from/$file"', and if you want to use a call to "cp" do
"cp -f". I thought there would be less overhead, copying entirely
within perl rather than making a system call to a utility, but 
"cp -f" should work fine. I am not sure if all "cp" utilities take
the same arguments as GNU cp. Is "cp -f" portable? If not, the line
for "unlink" needs to be moved to above "if ($symlink_exists)" and just
use "cp".
  
> > --- openssl-0.9.7/tools/c_rehash.in.orig    Fri Aug 17 04:35:58 
> 2001
> > +++ openssl-0.9.7/tools/c_rehash.in Thu Apr 18 18:42:26 2002
> > @@ -17,7 +17,7 @@
> > 
> >  $ENV{PATH} .= ":$dir/bin";
> > 
> > -if(! -f $openssl) {
> > +if(! -x $openssl) {
> >     my $found = 0;
> >     foreach (split /:/, $ENV{PATH}) {
> >             if(-f "$_/$openssl") {
> 
> I can understand changing -f to -x, but then, is there a reason you 
> didn't change the second -f?

Oversight. Thanks. 

The one problem I still see is with point.sh. It works for DJGPP, but
won't work for other systems without symbolic links. I don't know how
to test for symbolic links in a shell script.
                          Doug

__ 
Doug Kaufman
Internet: [EMAIL PROTECTED]

--- openssl-0.9.7/e_os.h.orig   Sat Apr  6 12:02:18 2002
+++ openssl-0.9.7/e_os.h        Thu Apr 18 18:42:26 2002
@@ -191,6 +191,14 @@
 
 #if (defined(WINDOWS) || defined(MSDOS))
 
+#  ifdef __DJGPP__
+#    include <unistd.h>
+#    include <sys/stat.h>
+#    define _setmode setmode
+#    define _O_TEXT O_TEXT
+#    define _O_BINARY O_BINARY
+#  endif /* __DJGPP__ */
+
 #  ifndef S_IFDIR
 #    define S_IFDIR    _S_IFDIR
 #  endif
@@ -336,7 +344,7 @@
 /*************/
 
 #ifdef USE_SOCKETS
-#  if defined(WINDOWS) || defined(MSDOS)
+#  if (defined(WINDOWS) || defined(MSDOS)) && !defined(__DJGPP__)
       /* windows world */
 
 #    ifdef OPENSSL_NO_SOCK
@@ -423,7 +431,9 @@
 #    define SSLeay_Write(a,b,c)    write((a),(b),(c))
 #    define SHUTDOWN(fd)    { shutdown((fd),0); closesocket((fd)); }
 #    define SHUTDOWN2(fd)   { shutdown((fd),2); closesocket((fd)); }
+#    ifndef INVALID_SOCKET
 #    define INVALID_SOCKET     (-1)
+#    endif /* INVALID_SOCKET */
 #  endif
 #endif
 
--- openssl-0.9.7/install.djgpp.orig    Thu Apr 18 18:42:26 2002
+++ openssl-0.9.7/install.djgpp Thu Apr 18 18:42:26 2002
@@ -0,0 +1,32 @@
+
+ 
+ INSTALLATION ON THE DOS PLATFORM WITH DJGPP
+ -------------------------------------------
+
+ Openssl has been ported to DOS, but only with long filename support. If
+ you wish to compile on native DOS with 8+3 filenames, you will have to
+ tweak the installation yourself, including renaming files with illegal
+ or duplicate names.
+
+ You should have a full DJGPP environment installed, including the
+ latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
+ requires that PERL and BC also be installed.
+
+ All of these can be obtained from the usual DJGPP mirror sites, such as
+ "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp";. You also need to have
+ the WATT-32 networking package installed before you try to compile
+ openssl. This can be obtained from "http://www.bgnett.no/~giva/";. The
+ Makefile assumes that the WATT-32 code is in directory "watt32" under
+ $DJDIR.
+
+ To compile openssl, start your BASH shell. Then configure for DOS by
+ running "./Configure" with appropriate arguments. The basic syntax for
+ DOS is:
+ ./Configure no-threads --prefix="/dev/env/DJDIR" DJGPP
+ 
+ You may run out of DPMI selectors when running in a DOS box under
+ Windows. If so, just close the BASH shell, go back to Windows, and
+ restart BASH. Then run "make" again.
+
+ Building openssl under DJGPP has been tested with DJGPP 2.03,
+ GCC 2.952, GCC 2.953, perl 5.005_02 and perl 5.006_01.
--- openssl-0.9.7/Configure.orig        2002-05-30 10:08:08.000000000 -0800
+++ openssl-0.9.7/Configure     2002-06-09 10:02:56.000000000 -0800
@@ -513,6 +513,9 @@
 "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 
-Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 
-Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
 
+# DJGPP
+"DJGPP", "gcc:-I/dev/env/DJDIR/watt32/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer 
+-O2 -Wall:::MSDOS:-L/dev/env/DJDIR/watt32/lib -lwatt:BN_LLONG ${x86_gcc_des} 
+${x86_gcc_opts}::::::::::",
+
 # Ultrix from Bernhard Simon <[EMAIL PROTECTED]>
 "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
 "ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
@@ -894,6 +897,7 @@
 my $IsWindows=scalar grep /^$target$/,@WinTargets;
 
 $exe_ext=".exe" if ($target eq "Cygwin");
+$exe_ext=".exe" if ($target eq "DJGPP");
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
 $prefix=$openssldir if $prefix eq "";
 
@@ -901,7 +905,7 @@
 chop $prefix if $prefix =~ /\/$/;
 
 $openssldir=$prefix . "/ssl" if $openssldir eq "";
-$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
+$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
 
 
 print "IsWindows=$IsWindows\n";
@@ -1226,6 +1230,34 @@
 close(IN);
 close(OUT);
 
+my $dir;
+my $crypt1;
+my $crypt2;
+my $crypt3;
+my $crypt4;
+my $crypt5;
+my $crypt6;
+my $symlink_exists;
+mkdir ('include/openssl', 0777) unless -d 'include/openssl';
+$symlink_exists=eval {symlink("",""); 1};
+foreach $dir (@skip) {
+    $crypt1=join('','crypto/', "$dir", '/', "$dir", 'test.c');
+    $crypt2=join('', 'test/', "$dir", 'test.c');
+    $crypt3=join('', '../', "$crypt1");
+    $crypt4=join('', 'crypto/', "$dir", '/', "$dir", '.h');
+    $crypt5=join('', 'include/openssl/', "$dir", '.h');
+    $crypt6=join('', '../../', "$crypt4");
+    unlink "$crypt2"; 
+    unlink "$crypt5";
+    if ($symlink_exists) {
+    symlink("$crypt3", "$crypt2");
+    symlink("$crypt6", "$crypt5");
+    } else {
+    system("cp $crypt1 $crypt2");
+    system("cp $crypt4 $crypt5");
+    }
+    }
+
 print "CC            =$cc\n";
 print "CFLAG         =$cflags\n";
 print "EX_LIBS       =$lflags\n";
--- openssl-0.9.7/util/mklink.pl.orig   2001-04-04 07:50:22.000000000 -0800
+++ openssl-0.9.7/util/mklink.pl        2002-06-09 18:05:42.000000000 -0800
@@ -18,10 +18,10 @@
 my $from = shift;
 my @files = @ARGV;
 
-my @from_path = split(/\//, $from);
+my @from_path = split(/[\\\/]/, $from);
 my $pwd = `pwd`;
 chop($pwd);
-my @pwd_path = split(/\//, $pwd);
+my @pwd_path = split(/[\\\/]/, $pwd);
 
 my @to_path = ();
 
@@ -51,6 +51,7 @@
 $symlink_exists=eval {symlink("",""); 1};
 foreach $file (@files) {
     my $err = "";
+    unlink "$from/$file"; 
     if ($symlink_exists) {
        symlink("$to/$file", "$from/$file") or $err = " [$!]";
     } else {
--- openssl-0.9.7/util/point.sh.orig    Sat Mar  6 12:32:06 1999
+++ openssl-0.9.7/util/point.sh Thu Apr 18 18:42:26 2002
@@ -1,6 +1,9 @@
 #!/bin/sh
 
 rm -f $2
-ln -s $1 $2
+if test "$OSTYPE" = msdosdjgpp;
+then cp -fR $1 $2;
+else ln -s $1 $2;
+fi
 echo "$2 => $1"
 
--- openssl-0.9.7/tools/c_rehash.in.orig        2001-08-16 20:35:58.000000000 -0800
+++ openssl-0.9.7/tools/c_rehash.in     2002-06-09 18:02:06.000000000 -0800
@@ -17,10 +17,10 @@
 
 $ENV{PATH} .= ":$dir/bin";
 
-if(! -f $openssl) {
+if(! -x $openssl) {
        my $found = 0;
        foreach (split /:/, $ENV{PATH}) {
-               if(-f "$_/$openssl") {
+               if(-x "$_/$openssl") {
                        $found = 1;
                        last;
                }       
--- openssl-0.9.7/test/tx509.orig       Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/tx509    Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl x509'
--- openssl-0.9.7/test/tsid.orig        Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/tsid     Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl sess_id'
--- openssl-0.9.7/test/trsa.orig        Mon Mar 13 20:31:46 2000
+++ openssl-0.9.7/test/trsa     Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 if ../apps/openssl no-rsa; then
--- openssl-0.9.7/test/treq.orig        Mon Mar 13 19:24:38 2000
+++ openssl-0.9.7/test/treq     Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl req -config ../apps/openssl.cnf'
--- openssl-0.9.7/test/tpkcs7d.orig     Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/tpkcs7d  Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl pkcs7'
--- openssl-0.9.7/test/tpkcs7.orig      Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/tpkcs7   Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl pkcs7'
--- openssl-0.9.7/test/testgen.orig     Mon Mar 13 20:31:44 2000
+++ openssl-0.9.7/test/testgen  Thu Apr 18 18:42:26 2002
@@ -6,7 +6,11 @@
 
 /bin/rm -f $T.1 $T.2 $T.key
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH;
+else
 PATH=../apps:$PATH;
+fi
 export PATH
 
 echo "generating certificate request"
--- openssl-0.9.7/test/testca.orig      Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/testca   Thu Apr 18 18:42:26 2002
@@ -1,7 +1,11 @@
 #!/bin/sh
 
 SH="/bin/sh"
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=./apps\;../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export SH PATH
 
 SSLEAY_CONFIG="-config CAss.cnf"
--- openssl-0.9.7/test/tcrl.orig        Sat Jan  2 19:01:40 1999
+++ openssl-0.9.7/test/tcrl     Thu Apr 18 18:42:26 2002
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+if test "$OSTYPE" = msdosdjgpp; then
+PATH=../apps\;$PATH
+else
 PATH=../apps:$PATH
+fi
 export PATH
 
 cmd='../apps/openssl crl'
--- openssl-0.9.7/crypto/ui/ui_openssl.c.orig   Thu Feb 14 17:06:24 2002
+++ openssl-0.9.7/crypto/ui/ui_openssl.c        Thu Apr 18 18:42:26 2002
@@ -269,7 +269,7 @@
 static long status;
 static unsigned short channel = 0;
 #else
-#ifndef OPENSSL_SYS_MSDOS
+#if !defined(OPENSSL_SYS_MSDOS) || defined(__DJGPP__)
 static TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
--- openssl-0.9.7/crypto/rand/rand_egd.c.orig   2002-05-22 04:02:16.000000000 -0800
+++ openssl-0.9.7/crypto/rand/rand_egd.c        2002-06-02 15:26:16.000000000 -0800
@@ -94,7 +94,7 @@
  *   RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
  */
 
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
+#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(__DJGPP__)
 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
        {
        return(-1);
--- openssl-0.9.7/crypto/des/read_pwd.c.orig    Thu Feb 21 14:09:38 2002
+++ openssl-0.9.7/crypto/des/read_pwd.c Thu Apr 18 18:42:26 2002
@@ -246,7 +246,7 @@
        long status;
        unsigned short channel = 0;
 #else
-#ifndef OPENSSL_SYS_MSDOS
+#if !defined(OPENSSL_SYS_MSDOS) || defined(__DJGPP__)
        TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
--- openssl-0.9.7/crypto/des/Makefile.ssl.orig  Sat Apr  6 20:06:28 2002
+++ openssl-0.9.7/crypto/des/Makefile.ssl       Thu Apr 18 18:42:26 2002
@@ -108,7 +108,7 @@
 
 links:
        @$(TOP)/util/point.sh Makefile.ssl Makefile
-       @$(TOP)/util/point.sh ../../perlasm asm/perlasm
+       @$(TOP)/util/point.sh `cd ../perlasm;pwd` asm/perlasm
        @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
        @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
        @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
--- openssl-0.9.7/crypto/bn/bn_mul.c.orig       Sun Oct 14 00:57:16 2001
+++ openssl-0.9.7/crypto/bn/bn_mul.c    Thu Apr 18 18:42:26 2002
@@ -66,7 +66,7 @@
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
-#if defined(OPENSSL_NO_ASM) || !(defined(__i386) || defined(__i386__))/* Assembler 
implementation exists only for x86 */
+#if defined(OPENSSL_NO_ASM) || !(defined(__i386) || defined(__i386__)) || 
+defined(__DJGPP__) /* Assembler implementation exists only for x86 */
 /* Here follows specialised variants of bn_add_words() and
    bn_sub_words().  They have the property performing operations on
    arrays of different sizes.  The sizes of those arrays is expressed through
--- openssl-0.9.7/crypto/bio/b_sock.c.orig      Sat Mar 30 00:02:20 2002
+++ openssl-0.9.7/crypto/bio/b_sock.c   Thu Apr 18 18:42:26 2002
@@ -484,7 +484,11 @@
        {
        int i;
 
+#ifdef __DJGPP__
+       i=ioctlsocket(fd,type,(char *)arg);
+#else
        i=ioctlsocket(fd,type,arg);
+#endif /* __DJGPP__ */
        if (i < 0)
                SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error());
        return(i);

Reply via email to