Fix errors for Ultrix
authorPaul Park <pjpark@mit.edu>
Fri, 12 May 1995 20:05:42 +0000 (20:05 +0000)
committerPaul Park <pjpark@mit.edu>
Fri, 12 May 1995 20:05:42 +0000 (20:05 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5804 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/v5client/ChangeLog
src/kadmin/v5client/configure.in
src/kadmin/v5client/kadmin5.c

index cd80c44b207a78dbbdbea6ab0cc72a2cd73fc877..4285e5970de63fc66a161f45a01515fdb0db361f 100644 (file)
@@ -1,4 +1,11 @@
 
+Fri May 12 16:04:01 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * configure.in  - Check for regex.h.
+       * kadmin5.c     - Use regex.h only if present.  Correctly calculate
+                         length of argument string to build when command is
+                         on command line.
+
+
 Thu May 11 12:18:27 EDT 1995   Paul Park       (pjpark@mit.edu)
        * kadmin5.c     - Change "programname" to be the last component of
                          argv[0].  Also correctly terminate generated
index d870e2510165a4af201d0302fbaddd1c72bf09f7..24acb693dfa9d70d579d220c315ec51489370021 100644 (file)
@@ -4,7 +4,7 @@ CONFIG_RULES
 AC_SET_BUILDTOP
 AC_PROG_INSTALL
 AC_PROG_YACC
-AC_HAVE_HEADERS(pwd.h)
+AC_HAVE_HEADERS(pwd.h regex.h)
 AC_HAVE_FUNCS(strptime re_comp regcomp getcwd)
 AC_CONST
 WITH_NETLIB
index 9a51bbf998ad4b6669d5b49e0cad678b750aabb7..92ed342f55c25ececdef1013611775841d50b5b6 100644 (file)
@@ -33,9 +33,9 @@
 #if    HAVE_PWD_H
 #include <pwd.h>
 #endif /* HAVE_PWD_H */
-#if    HAVE_RE_COMP || HAVE_REGCOMP
+#if    HAVE_REGEX_H
 #include <regex.h>
-#endif /* HAVE_RE_COMP || HAVE_REGCOMP */
+#endif /* HAVE_REGEX_H */
 
 /*
  * Global storage.
@@ -1413,6 +1413,7 @@ kadmin_startup(argc, argv)
        for (i=optind; i<argc; i++)
            n2alloc += strlen(argv[i]) + 1;
 
+       n2alloc++;
        if (action = (char *) malloc(n2alloc)) {
            for (i=optind; i<argc; i++) {
                strcat(action, argv[i]);