crypto: Avoid variadic macros
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 6 Mar 2011 18:18:07 +0000 (18:18 +0000)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 7 Mar 2011 01:09:45 +0000 (17:09 -0800)
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 <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/crypto/rfc3961/context.c
src/crypto/rfc3961/krb5_locl.h

index 741c8cf..434fe97 100644 (file)
@@ -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;
+}
index 5c4af4b..a3eae68 100644 (file)
@@ -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