Hi OpenSSL project,

I'd like to submit a small patch that fixes 2 compile issues:

1) Function BIO_dup_chain() has a local variable called "new", which is a  
reserved keyword in C++. The patch renames the variable to "new_bio". It  
can be argued that OpenSSL is not meant to be compiled by C++ compiler.  
But there are people who do it anyway. And it doesn't harm for a library  
to be a bit more compatible. And the solution is simple and safe. Thus I  
am kindly asking to accept this change.

2) Structure x509_lookup_method_st aka X509_LOOKUP_METHOD has a member  
called "free". It conflicts with MS Visual Studio memory debugger. When  
memory debugger is enabled, it defines the following:

        #define   free(p)               _free_dbg(p, _NORMAL_BLOCK)

And compilation fails. The patch renames "free" to "free_item", analogous  
to "new_item" member in the same structure.

I checked the patch against the latest release (1.0.1) and the latest CVS  
snapshot (SNAP-20120412). It applies cleanly and the resulting code  
compiles without issues.


Best regards,
Alexei Khlebnikov,
Opera Software ASA, Norway.

Attachment: openssl-new-free.2012-04-12.patch
Description: Binary data

Reply via email to