From 2a17517ee79dbea176464bf6e0ee0617df1aae6b Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 6 Mar 2011 18:18:07 +0000 Subject: [PATCH] crypto: Avoid variadic macros The IRIX compiler doesn't seem to like variadic macros, so avoid using them within the RFC3961 kernel crypto implementation Change-Id: I4bfddb01eb86a96e981c148e26281cc73130f924 Reviewed-on: http://gerrit.openafs.org/4154 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/crypto/rfc3961/context.c | 13 +++++++++++++ src/crypto/rfc3961/krb5_locl.h | 10 +++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/crypto/rfc3961/context.c b/src/crypto/rfc3961/context.c index 741c8cf966..434fe974a3 100644 --- a/src/crypto/rfc3961/context.c +++ b/src/crypto/rfc3961/context.c @@ -6,3 +6,16 @@ int krb5_init_context(krb5_context *ctx) { return 0; } + +void +krb5_set_error_message(krb5_context ctx, krb5_error_code ret, const char *fmt, + ...) +{ + return; +} + +krb5_error_code +krb5_abortx(krb5_context ctx, const char *fmt, ...) +{ + return; +} diff --git a/src/crypto/rfc3961/krb5_locl.h b/src/crypto/rfc3961/krb5_locl.h index 5c4af4b981..a3eae68e26 100644 --- a/src/crypto/rfc3961/krb5_locl.h +++ b/src/crypto/rfc3961/krb5_locl.h @@ -130,9 +130,13 @@ typedef struct krb5_crypto_iov { /* Currently, we just disable localised error strings. We'll get the error * numbers out, but no meaningful text */ -#define N_(...) "" -#define krb5_set_error_message(...) -#define krb5_abortx(...) +#define N_(X, Y) X + +/* These have to be real functions, because IRIX doesn't seem to support + * variadic macros */ +void krb5_set_error_message(krb5_context, krb5_error_code, const char *, ...); +krb5_error_code krb5_abortx(krb5_context, const char *, ...); + #define krb5_clear_error_message(ctx) /* Local prototypes. These are functions that we aren't admitting to in the