Skip to content
Snippets Groups Projects
Commit f2de1710 authored by Lev Walkin's avatar Lev Walkin
Browse files

portability

parent 74057d53
No related branches found
No related tags found
No related merge requests found
...@@ -45,13 +45,17 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ ...@@ -45,13 +45,17 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */
/* /*
* Invoke the callback with a complete error message. * Invoke the callback with a complete error message.
*/ */
#ifdef __GNUC__
#define _ASN_ERRLOG(fmt, args...) do { \ #define _ASN_ERRLOG(fmt, args...) do { \
if(app_errlog) \ if(app_errlog) \
_asn_i_log_error(app_errlog, \ _asn_i_log_error(app_errlog, \
app_key, fmt, ##args); \ app_key, fmt, ##args); \
break; \ } while(0);
} while(0); #else /* Preprocessor does not support variable args macros */
void _asn_i_log_error(asn_app_consume_bytes_f *, void *key, #define _ASN_ERRLOG if(app_errlog) _asn_i_log_error
#endif
extern void _asn_i_log_error(asn_app_consume_bytes_f *, void *key,
const char *fmt, ...) __attribute__ ((format(printf, 3, 4))); const char *fmt, ...) __attribute__ ((format(printf, 3, 4)));
#endif /* _ASN1_CONSTRAINTS_VALIDATOR_H_ */ #endif /* _ASN1_CONSTRAINTS_VALIDATOR_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment