From: Simon Wilkinson Date: Sun, 6 Mar 2011 18:18:07 +0000 (+0000) Subject: crypto: Avoid variadic macros X-Git-Tag: upstream/1.8.0_pre1^2~4084 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2a17517ee79dbea176464bf6e0ee0617df1aae6b;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/crypto/rfc3961/context.c b/src/crypto/rfc3961/context.c index 741c8cf96..434fe974a 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 5c4af4b98..a3eae68e2 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