[EMAIL PROTECTED] - Fri Feb 27 14:44:25 2004]: > In message <[EMAIL PROTECTED]> on Fri, 27 Feb > 2004 14:09:07 +0100 (MET), "Stephen Henson via RT" <[EMAIL PROTECTED]> > said: > > rt> The workaround we use is to #undef these first in the relevant > header > rt> file but as the OP reports this only works if you #include > <windows.h> > rt> (which includes wincrypt.h) first. > > Uhmm, I was under the impression that #undef'ing an undefined macro > basically is a no-op and should not be a problem. Is that incorrect? > Or perhaps that's just incorrect in the Microsoft world? :-) >
It is correct but that's the cause of the problem. Under Win32 we have... wincrypt.h (included by from windows.h): #define X509_NAME whatever ossl_typ.h (included by pem.h et al) #undef X509_NAME typedef struct X509_name_st X509_NAME So if windows.h in included first the definition of X509_NAME gets #undef'ed it becomes the structure as any OpenSSL source would expect. If windows.h is not included first then the #undef X509_NAME has no effect but the structure still gets defined. When windows.h is included X509_NAME gets #defined to whatever Windows wants it to be and any OpenSSL source bombs with a compilation error. Steve. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
