I have just looked at the source you are using. Ok - I got that wrong in one area, but correct in another.

First, I think that - just as _stricmp is aliased stricmp (by a command line define), _strnicmp needs to be aliased to strnicmp.

ie. your line to your compiler should say

bcc32 -otmp32\fips_aesavs.obj -Iinc32 -Itmp32 -DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl
-c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN
-DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp -O2 -ff -fp -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 -c .\fips\aes\fips_aesavs.c


Note the addition of the aliasing define.

Note again that I have not tried this...

On line 977, the cause of the warning is the code

   if (!(fp = fopen(rqlist, "r")))

If you change this to

   if ((fp = fopen(rqlist, "r")) == 0)

you should no longer get the warning. Alternatively, (if you do not want to modify the actual source), simply ignore the warning.


Paul Adams Perth, Western Australia


Paul S Adams (Personal) wrote:

There were way too many errors in my original posting - see below the corrected version.

Paul S Adams (Personal) wrote:

Hi Biker Conrad,

I am a user of C++ Builder 6.0, but haven't tried this myself.

My suspicion though is that you may need to #include <string.h> in fips_aesavs.c. From memory, all the string comparison function macros (aliases to standard name and vice-versa) are in this include file.

The possibly incorrect assignment means that a conditional statement used an assignment where a comparison is expected (ie. boolean result). As a common coding error is to write

   if(a = b)

when

   if(a == b)

was intended, the Borland compiler issues a warning about this. However, it is a completely valid construct. For example, code that says

   if(c = getdata())

is commonly used in C / C++ to load a variable with the result of a function call and perform a boolean test, all at the same time. You can avoid the compiler issuing this warning by using the construct

   if((c = getdata()) != 0)

I hope all this helps - I have written it without any reference to the OpenSSL source.


Paul Adams Perth, Western Australia


Biker Conrad wrote:

I tried to compile openssl 0.9.7e
(http://www.openssl.org/source/openssl-0.9.7e.tar.gz)
with BCB 6.0 and I got the following errors:

       bcc32 -otmp32\fips_aesavs.obj -Iinc32 -Itmp32
-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC
-tWM -DOPENS
SL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32
-D_stricmp=stricmp -O2 -ff -fp -DBN_ASM -DMD5_ASM
-DSHA1_ASM -DRMD160_ASM -DOPEN
SSL_NO_IDEA -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5  -c
.\fips\aes\fips_aesavs.c
.\fips\aes\fips_aesavs.c:
Warning W8065 .\fips\aes\fips_aesavs.c 97: Call to
function '_strnicmp' with no prototype in function
AESTest
Warning W8065 .\fips\aes\fips_aesavs.c 735: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 749: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 751: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 773: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 776: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 803: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 824: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8065 .\fips\aes\fips_aesavs.c 868: Call to
function '_strnicmp' with no prototype in function
proc_file
Warning W8060 .\fips\aes\fips_aesavs.c 977: Possibly
incorrect assignment in function main
       ilink32 -ap -Tpe -x -Gn tmp32\fips_aesavs.obj
c0x32.obj, out32\fips_aesavs.exe,, out32\ssleay32.lib
out32\libeay
32.lib cw32mt.lib import32.lib
Turbo Incremental Link 5.64 Copyright (c) 1997-2002
Borland
Error: Unresolved external '__strnicmp' referenced
from
F:\DEVELOPMENT\CPP\OPENSSL-0.9.7E\TMP32\FIPS_AESAVS.OBJ

** error 2 ** deleting out32\fips_aesavs.exe

I know there is this package Win32 OpenSSL but I
really wanted to exclude idea and rc5. I also tried
the latest 0.9.7 stable snapshot
(ftp://ftp.openssl.org/snapshot/openssl-0.9.7-stable-SNAP-20041204.tar.gz)


but I get other errors even earlier in the build
process.

Thank you

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]






______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]



______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]



______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]

Reply via email to