use getcwd if available
authorMark Eichin <eichin@mit.edu>
Fri, 24 Jun 1994 07:14:35 +0000 (07:14 +0000)
committerMark Eichin <eichin@mit.edu>
Fri, 24 Jun 1994 07:14:35 +0000 (07:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3911 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/edit/configure.in
src/admin/edit/kdb5_edit.c

index 7d522928f2dcfcf5f7912eaa34c618861b18438a..ca9352a5c79bce091aa44d7df64243862a09c055 100644 (file)
@@ -3,6 +3,7 @@ WITH_CCOPTS
 AC_SET_BUILDTOP
 AC_HAVE_LIBRARY(socket)
 AC_HAVE_LIBRARY(nsl)
+AC_HAVE_FUNCS(getcwd)
 SS_RULES
 CONFIG_RULES
 KRB_INCLUDE
index 09680607fc25507941657bf073a6698629697f09..43ba606f66202cc3b663aec93f356a41f8ae4f94 100644 (file)
@@ -1347,6 +1347,10 @@ void change_working_dir(argc, argv)
        }
 }
 
+#ifdef HAVE_GETCWD
+#define getwd(x) getcwd(x,MAXPATHLEN)
+#endif
+
 void print_working_dir(argc, argv)
        int     argc;
        char    **argv;
@@ -1361,6 +1365,10 @@ void print_working_dir(argc, argv)
        puts(buf);
 }
 
+#ifdef HAVE_GETCWD
+#undef getwd
+#endif
+
 int quit()
 {
     krb5_error_code retval;