From: Dr S N Henson <[EMAIL PROTECTED]>

drh> An issue has arisen with Windows DLLs and the new ASN1 code...
[...]
drh> AFAICS this needs a "DATA" declaration in the DEF file *and* a custom
drh> header declaration otherwise it doesn't work (linker errors or invalid
drh> data).
drh> 
drh> The header declaration is where things get more interesting. When
drh> compiling code that is going to be linked into the DLL you need to
drh> precede the variable with: 
drh> 
drh> _declspec( dllexport )
drh> 
drh> however when linking to these variables you need:
drh> 
drh> _declspec( dllimport )
drh> 
drh> So the declaration needs to be different according to whether the DLL
drh> code is being compiled or linked to. 

drh> Any thoughts? 

>From a VMS point of view, this is partly an issue as well.  For
starters, you should probably use the macros OPENSSL_EXTERN and
OPENSSL_GLOBAL which are defined in e_os2.h (and will need extra
definitions for the Win32 case.  Of course, what you say above means
that OPENSSL_EXTERN will have different values depending on if you're
building the DLL or using it.  That's pretty easy to do if we use a
macro BUILD_SHLIB as a flag.  Of course, if any other DLL needs to
reexport OpenSSL symbols (is that what you meant?), it wll have to
defined BUILD_SHLIB as well...

-- 
Richard Levitte   \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken   \ S-168 35  BROMMA  \ T: +46-8-26 52 47
Redakteur@Stacken   \      SWEDEN       \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to