aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-08-11 09:25:09 +0000
committerLev Walkin <vlm@lionet.info>2004-08-11 09:25:09 +0000
commitf2de171041b468d26a4f795eabd8c093bea62e91 (patch)
treead8afd166cb4305895af2a954418053be4179b22 /skeletons
parent74057d535e40b19def01867cfb10ddd14a30db1d (diff)
portability
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/constraints.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/skeletons/constraints.h b/skeletons/constraints.h
index 255b6ae2..d299e735 100644
--- a/skeletons/constraints.h
+++ b/skeletons/constraints.h
@@ -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_ */