summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-err.h21
-rw-r--r--src/include/k5-int.h5
2 files changed, 26 insertions, 0 deletions
diff --git a/src/include/k5-err.h b/src/include/k5-err.h
index a6dedcc88..e5fc9bddf 100644
--- a/src/include/k5-err.h
+++ b/src/include/k5-err.h
@@ -65,6 +65,22 @@ krb5int_vset_error (struct errinfo *ep, long code,
__attribute__((__format__(__printf__, 3, 0)))
#endif
;
+void
+krb5int_set_error_fl (struct errinfo *ep, long code,
+ const char *file, int line,
+ const char *fmt, ...)
+#if !defined(__cplusplus) && (__GNUC__ > 2)
+ __attribute__((__format__(__printf__, 5, 6)))
+#endif
+ ;
+void
+krb5int_vset_error_fl (struct errinfo *ep, long code,
+ const char *file, int line,
+ const char *fmt, va_list args)
+#if !defined(__cplusplus) && (__GNUC__ > 2)
+ __attribute__((__format__(__printf__, 5, 0)))
+#endif
+ ;
const char *
krb5int_get_error (struct errinfo *ep, long code);
void
@@ -74,4 +90,9 @@ krb5int_clear_error (struct errinfo *ep);
void
krb5int_set_error_info_callout_fn (const char *(KRB5_CALLCONV *f)(long));
+#ifdef DEBUG_ERROR_LOCATIONS
+#define krb5int_set_error(ep, code, ...) \
+ krb5int_set_error_fl(ep, code, __FILE__, __LINE__, __VA_ARGS__)
+#endif
+
#endif /* K5_ERR_H */
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 5e159d9a4..de391a7d9 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -2797,4 +2797,9 @@ krb5int_pac_sign(krb5_context context,
const krb5_keyblock *privsvr_key,
krb5_data *data);
+#ifdef DEBUG_ERROR_LOCATIONS
+#define krb5_set_error_message(ctx, code, ...) \
+ krb5_set_error_message_fl(ctx, code, __FILE__, __LINE__, __VA_ARGS__)
+#endif
+
#endif /* _KRB5_INT_H */