Hi Everybody
I built the openssl 0.9.4 on WinNT 4.0 CZE with serv.pack 4
using mingw32 compiler.
I encountered with problems that follows
1) Symbol WINDOWS is not defined. I defined this symbol in makefiles
See attached patch. Mumit Khan means that is not desirable to define
this symbol by compiler.
On Wed, 19 Jan 2000, Mumit Khan wrote:
> On Wed, 19 Jan 2000, Vaclav Ovsik wrote:
>
> > I right now successfuly build openssl 0.9.4.
> > OpenSSL uses symbol WINDOWS. It conditionaly compiles
> > code when this symbol is defined. I don't know if this
> > symbol should be defined or may be defined.
> >
> > What about inserting it into specs ?
>
> Sorry, but user code should be using _WIN32, not WINDOWS which is
> a gross pollution of user namespace. It's much better to send a
> patch to the authors, and _WIN32 will work for all the Windows
> 32-bit compilers.
>
2) In file crypto/bn/bntest.c is used identifier lst1, which is undesirably
replaced with 0x460 by preprocesor. Symbol lst1 is defined in deeply
included system file dlgs.h. I change this identifier to list1 (see patch).
On Wed, 19 Jan 2000, Mumit Khan wrote:
> On Wed, 19 Jan 2000, Vaclav Ovsik wrote:
>
> > Hi Mumit
> >
> > I'm trying to build openssl with mingw32 (gcc-2.95.2). Compilation
> > aborted, identifier "lst1" was substitued with 0x460.
> > Oh, ... ! Searching, searching ...
> > found:
> > /gcc-2.95.2/i386-mingw32/include/dlgs.h
> >
> > Is this resonable to define symbols lst1 .. lst16 ....,
> > without underscore or something ? Or this is in right place ?
> >
>
> Windows defines lst1 etc, so not much we can do about it.
>
After all, openssl was successfuly compiled and all tests passed.
Details:
OS: Windows NT workstation 4.0 CZE, servis pack 4
Compiler: mingw32 gcc 2.95.2 19991024 with quotefix
downloaded from
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2/
gcc-2.95.2-crtdll.exe, quote-fix-crtdll.zip
Make: GNU make from Cygwin B 20.1
Perl: perl 5.00503
Best Regards
--
Vaclav Ovsik email: [EMAIL PROTECTED]
ICZ a.s. phone: +420 19 7165659
fax: +420 19 7165651
diff -U 2 -r openssl-0.9.4.Orig/Configure openssl-0.9.4/Configure
--- openssl-0.9.4.Orig/Configure Sun Aug 08 13:56:29 1999
+++ openssl-0.9.4/Configure Wed Jan 19 15:24:49 2000
@@ -288,5 +288,5 @@
# and its library files in util/pl/*)
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486
-Wall::::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
-"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG
$x86_gcc_des $x86_gcc_opts:",
+"Mingw32", "gcc:-DWINDOWS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG
+$x86_gcc_des $x86_gcc_opts:",
# Ultrix from Bernhard Simon <[EMAIL PROTECTED]>
diff -U 2 -r openssl-0.9.4.Orig/crypto/bn/bntest.c openssl-0.9.4/crypto/bn/bntest.c
--- openssl-0.9.4.Orig/crypto/bn/bntest.c Fri Jul 16 01:47:01 1999
+++ openssl-0.9.4/crypto/bn/bntest.c Wed Jan 19 17:26:06 2000
@@ -96,5 +96,5 @@
#endif
-static unsigned char
lst1[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9"
+static unsigned char
+list1[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9"
"\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0";
@@ -155,5 +155,5 @@
fprintf(stderr,"test BN_lshift (fixed)\n");
- if (!test_lshift(out,ctx,BN_bin2bn(lst1,sizeof(lst1)-1,NULL)))
+ if (!test_lshift(out,ctx,BN_bin2bn(list1,sizeof(list1)-1,NULL)))
goto err;
fflush(stdout);
diff -U 2 -r openssl-0.9.4.Orig/util/pl/Mingw32.pl openssl-0.9.4/util/pl/Mingw32.pl
--- openssl-0.9.4.Orig/util/pl/Mingw32.pl Thu Jul 29 19:27:29 1999
+++ openssl-0.9.4/util/pl/Mingw32.pl Wed Jan 19 15:58:44 2000
@@ -21,5 +21,5 @@
else
{ $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; }
-
+$cflags = "-DWINDOWS $cflags";
$obj='.o';
$ofile='-o ';
diff -U 2 -r openssl-0.9.4.Orig/util/pl/Mingw32f.pl openssl-0.9.4/util/pl/Mingw32f.pl
--- openssl-0.9.4.Orig/util/pl/Mingw32f.pl Mon Jul 26 13:56:18 1999
+++ openssl-0.9.4/util/pl/Mingw32f.pl Wed Jan 19 15:59:06 2000
@@ -15,5 +15,5 @@
else
{ $cflags="-O3 -fomit-frame-pointer"; }
-
+$cflags = "-DWINDOWS $cflags";
$obj='.o';
$ofile='-o ';