]> 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>
Mon, 1 Nov 2010 12:20:54 +0000 (05:20 -0700)
IRIX apparently has enough krb5 to try building aklog, but no
error_message. ok. so let's cope

Change-Id: I3cb6d529829de348f73d5c9f5380e153f8ccce52
Reviewed-on: http://gerrit.openafs.org/3208
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/aklog/aklog.c
src/cf/krb5.m4
src/config/afsconfig-windows.h

index a4d56a3771ebe4435e0da8b0b2ef48ed91ffbec6..81be7eb9159f57f84b7e9339df0b8c7304a315c6 100644 (file)
@@ -338,8 +338,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 d23a8c0e12266de57ee9b9ba09e58b0040c60080..b7ba7a53ce8b81ec4f3971127e7cda885e9f00ff 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