]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
check for error_message
authorDerrick Brashear <shadow@dementia.org>
Mon, 1 Nov 2010 01:58:37 +0000 (21:58 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 18 Feb 2011 14:15:13 +0000 (06:15 -0800)
IRIX apparently has enough krb5 to try building aklog, but no
error_message. ok. so let's cope

Reviewed-on: http://gerrit.openafs.org/3208
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 572f9baaeb626293f4db62a66db1ea9b9a373c03)

Change-Id: I44c71ffedcbe55db696db667d1941a7bdc781cff
Reviewed-on: http://gerrit.openafs.org/3987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/aklog/aklog.c
src/cf/krb5.m4
src/config/afsconfig-windows.h

index b72f96eb1d5280b363b42f4111000ef825e70869..afb25b96dc58bacd0e972d5cfd4bf780f4657138 100644 (file)
@@ -335,8 +335,10 @@ redirect_errors(const char *who, afs_int32 code, const char *fmt, va_list ap)
        if (strncmp(str, "unknown", strlen("unknown")) == 0) {
 #ifdef HAVE_KRB5_SVC_GET_MSG
            krb5_svc_get_msg(code,&str);
-#else
+#elif defined(HAVE_ERROR_MESSAGE)
            str = error_message(code);
+#else
+           ; /* IRIX apparently has neither: use the string we have */
 #endif
        }
        fputs(str, stderr);
index a14dd2f4aa69164e64049e110d23ebd5b2009972..898c29c6138edf3d1d0c1847d364fb25562c4dee 100644 (file)
@@ -139,9 +139,10 @@ AC_DEFUN([_RRA_LIB_KRB5_MANUAL],
      [AC_CHECK_FUNCS([krb5_free_error_message])],
      [AC_CHECK_FUNCS([krb5_get_error_string], ,
          [AC_CHECK_FUNCS([krb5_get_err_txt], ,
+            [AC_CHECK_FUNCS([error_message], ,
              [AC_CHECK_FUNCS([krb5_svc_get_msg],
                  [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h])],
-                 [AC_CHECK_HEADERS([et/com_err.h])])])])])
+                 [AC_CHECK_HEADERS([et/com_err.h])])])])])])
  RRA_LIB_KRB5_RESTORE])
 
 dnl Sanity-check the results of krb5-config and be sure we can really link a
index 6e7662c49074f7086f6aa745b50624f8a27f86b9..1edd7cb6e4dab2310ea486527ec4007bfc693d76 100644 (file)
@@ -49,6 +49,9 @@
 /* Define if you have the connect function.  */
 #undef HAVE_CONNECT
 
+/* Define if you have the error_message function.  */
+#define HAVE_ERROR_MESSAGE
+
 /* Define if you have the gethostbyname function.  */
 #define HAVE_GETHOSTBYNAME