> 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.

OK.

> 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.

Renaming structure members in released code is not desirable. How about

--- crypto/x509/x509_lu.c       19 Feb 2010 18:27:07 -0000      1.34
+++ crypto/x509/x509_lu.c       13 Apr 2012 14:58:30 -0000
@@ -87,7 +87,7 @@
        if (ctx == NULL) return;
        if (    (ctx->method != NULL) &&
                (ctx->method->free != NULL))
-               ctx->method->free(ctx);
+               (*ctx->method->free)(ctx);
        OPENSSL_free(ctx);
        }

instead?


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to