Richard Levitte - VMS Whacker wrote:
>
> From: Dr S N Henson <[EMAIL PROTECTED]>
>
> drh> Well the relevant functions and variables are declared with a macro:
> drh>
> drh> DECLARE_ASN1_FUNCTIONS(SOME_ASN1_THING)
>
> Doesn't look too difficult. Replace "extern const" with
> "OPENSSL_EXTERN const"...
>
Yep. I've got some test code of my own that does that.
> drh> this appears in some OpenSSL headers. It may also appear in some
> drh> external DLL headers if they declare their own ASN1 modules. AFAICs this
> drh> means the OpenSSL header version has to import variables and the DLL
> drh> header export them when the external DLL is built. When the external DLL
> drh> is being linked to everything is import.
> drh>
> drh> Hmmm... I'll have to think about this a bit more.
>
> Do you see a flaw with having mk1mf.pl add a -DOPENSSL_BUILD_SHLIB to
> the C flags and have e_os2.h defined OPENSSL_EXTERN for Win32 with the
> correct value depending on if OPENSSL_BUILD_SHLIB exists or not?
>
That will work for OpenSSL, certainly.
What I'm not sure about is how this can work with an application that
wants to compile an additional external DLL which might effectively need
OPENSSL_EXTERN (via DECLARE_...) to mean two different things in
different places. That is import for stuff defined in the OpenSSL header
files and export for stuff it defines itself in its own header files
when its compiled or import everywhere when its being linked to.
That's what I'm thinking about... and what happens if a new DLL comes
along which wants to be linked to the first two etc...
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]