* configure.in: Test that regcomp actually works
authorKen Raeburn <raeburn@mit.edu>
Tue, 30 Apr 1996 21:54:16 +0000 (21:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 30 Apr 1996 21:54:16 +0000 (21:54 +0000)
* 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

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/Makefile.in
src/lib/krb5/os/configure.in
src/lib/krb5/os/sn2princ.c
src/lib/krb5/os/t_an_to_ln.c

index c6edc6d64b1efb06934538c0b3976eecbcdae8ac..c2b4f96f745461a20adcebd286a57b3a644c4de2 100644 (file)
@@ -1,3 +1,12 @@
+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
index 6e23fa75bddcb6ca5df5af99d3334ce0f860555d..8c49fbe40537fde281075935547de369cf61329f 100644 (file)
@@ -146,7 +146,7 @@ check-unix::
        $(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
index f3a48865f879292f5b77dbe30675e6df33d28637..b7f52f497780e99d7e87a532744a23431da63868 100644 (file)
@@ -4,7 +4,20 @@ dnl time checks are for timeofday.c (which gets them from osconf.h)
 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)
index 318b07403aa4c5729b469a5653a7e3f7fda477a9..75f52ace6fb223e817fe71975087901bafa39920 100644 (file)
@@ -45,9 +45,7 @@ krb5_sname_to_principal(context, hostname, sname, type, ret_princ)
     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)) {
index be91868d8a63c280986106d0f7c5ff0adc996228..9fb0c301703e5b3c9bd8ca21f0953dbdf19c3862 100644 (file)
@@ -25,8 +25,8 @@ main(argc, argv)
                       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);
        }