* Makefile.in (check-unix): Use $(RM).
* t_an_to_ln.c (main): Print principal name when an error is detected.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7874
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Apr 30 17:51:47 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * configure.in: Test that regcomp actually works.
+
+ * Makefile.in (check-unix): Use $(RM).
+
+ * t_an_to_ln.c (main): Print principal name when an error is
+ detected.
+
Thu Apr 11 22:15:44 1996 Theodore Y. Ts'o <tytso@dcl>
* ustime.c (krb5_us_timeofday): When doing the time offset
$(KRB5_RUN_ENV) ./t_an_to_ln rul/helpme/e@r ru/123/le@r
KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \
$(KRB5_RUN_ENV) ./t_an_to_ln fred/r@r barney/r@r
- rm ./t_an.*
+ $(RM) ./t_an.*
clean::
$(RM) $(TEST_PROGS) test.out t_std_conf.o t_an_to_ln.o
dnl and gmt_mktime.c (which only gets them from here...)
AC_TIME_WITH_SYS_TIME
AC_HAVE_HEADERS(unistd.h sys/time.h regex.h regexp.h)
-AC_HAVE_FUNCS(re_comp regcomp)
+
+dnl regcomp is present but non-functional on Solaris 2.4
+AC_C_CROSS
+AC_MSG_CHECKING(for working regcomp)
+AC_CACHE_VAL(ac_cv_func_regcomp,[
+AC_TRY_RUN([
+#include <regex.h>
+regex_t x; regmatch_t m;
+int main() { return regcomp(&x,"pat.*",0) || regexec(&x,"pattern",1,&m,0); }
+], ac_cv_func_regcomp=yes, ac_cv_func_regcomp=no)])
+AC_MSG_RESULT($ac_cv_func_regcomp)
+test $ac_cv_func_regcomp = yes && AC_DEFINE(HAVE_REGCOMP)
+
+AC_HAVE_FUNCS(re_comp)
AC_HEADER_EGREP(time_t, sys/types.h, AC_DEFINE(POSIX_TYPES))
HAS_ANSI_VOLATILE
AC_DEFINE(AN_TO_LN_RULES)
krb5_error_code retval;
register char *cp;
char localname[MAXHOSTNAMELEN];
- /* We cast this instead of declaring as const char* due to some compilers
- * which apparently get upset at reassigning the variable
- */
+
if ((type == KRB5_NT_UNKNOWN) ||
(type == KRB5_NT_SRV_HST)) {
programname, argv[i], sbuf);
}
else {
- printf("%s: aname to lname returns %s\n", programname,
- error_message(kret));
+ printf("%s: aname to lname returns %s for %s\n", programname,
+ error_message(kret), argv[i]);
}
krb5_free_principal(kcontext, principal);
}