Commit f2de1710 authored by Lev Walkin's avatar Lev Walkin
Browse files

portability

parent 74057d53
......@@ -45,13 +45,17 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */
/*
* Invoke the callback with a complete error message.
*/
#ifdef __GNUC__
#define _ASN_ERRLOG(fmt, args...) do { \
if(app_errlog) \
_asn_i_log_error(app_errlog, \
app_key, fmt, ##args); \
break; \
} while(0);
void _asn_i_log_error(asn_app_consume_bytes_f *, void *key,
} while(0);
#else /* Preprocessor does not support variable args macros */
#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)));
#endif /* _ASN1_CONSTRAINTS_VALIDATOR_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment