Since there's no continuation, the ; can go as well :-)
[oweals/openssl.git] / crypto / asn1 / asn1_mac.h
index a9026d7cd47b3b089e76e367bbed09ec79d35f9e..a48649ceeb32f2e3d6fe04be9ec82b3c16891d8d 100644 (file)
 #ifndef HEADER_ASN1_MAC_H
 #define HEADER_ASN1_MAC_H
 
+#include <openssl/asn1.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/asn1.h>
-
 #ifndef ASN1_MAC_ERR_LIB
 #define ASN1_MAC_ERR_LIB       ERR_LIB_ASN1
 #endif 
 
 #define ASN1_MAC_H_err(f,r,line) \
-       ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),ERR_file_name,(line))
+       ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),__FILE__,(line))
 
 #define M_ASN1_D2I_vars(a,type,func) \
        ASN1_CTX c; \
        type ret=NULL; \
        \
-       c.pp=pp; \
-       c.q= *pp; \
+       c.pp=(unsigned char **)pp; \
+       c.q= *(unsigned char **)pp; \
        c.error=ERR_R_NESTED_ASN1_ERROR; \
        if ((a == NULL) || ((*a) == NULL)) \
                { if ((ret=(type)func()) == NULL) \
@@ -85,13 +85,13 @@ extern "C" {
        else    ret=(*a);
 
 #define M_ASN1_D2I_Init() \
-       c.p= *pp; \
+       c.p= *(unsigned char **)pp; \
        c.max=(length == 0)?0:(c.p+length);
 
 #define M_ASN1_D2I_Finish_2(a) \
        if (!asn1_Finish(&c)) \
                { c.line=__LINE__; goto err; } \
-       *pp=c.p; \
+       *(unsigned char **)pp=c.p; \
        if (a != NULL) (*a)=ret; \
        return(ret);
 
@@ -99,7 +99,7 @@ extern "C" {
        M_ASN1_D2I_Finish_2(a); \
 err:\
        ASN1_MAC_H_err((e),c.error,c.line); \
-       asn1_add_error(*pp,(int)(c.q- *pp)); \
+       asn1_add_error(*(unsigned char **)pp,(int)(c.q- *pp)); \
        if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \
        return(NULL)
 
@@ -111,7 +111,7 @@ err:\
        c.slen = length;
 
 /* End reading ASN1 with no check on length */
-#define M_ASN1_D2I_Finish_nolen() \
+#define M_ASN1_D2I_Finish_nolen(a, func, e) \
        *pp=c.p; \
        if (a != NULL) (*a)=ret; \
        return(ret); \
@@ -340,7 +340,7 @@ err:\
 
 /* New macros */
 #define M_ASN1_New_Malloc(ret,type) \
-       if ((ret=(type *)Malloc(sizeof(type))) == NULL) \
+       if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \
                { c.line=__LINE__; goto err2; }
 
 #define M_ASN1_New(arg,func) \