aboutsummaryrefslogtreecommitdiffstats
path: root/indep.c
diff options
context:
space:
mode:
Diffstat (limited to 'indep.c')
-rw-r--r--indep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/indep.c b/indep.c
index 2842677..9284a39 100644
--- a/indep.c
+++ b/indep.c
@@ -1,4 +1,4 @@
-/* $Id: indep.c,v 1.11 2001/11/26 09:04:01 ukai Exp $ */
+/* $Id: indep.c,v 1.12 2001/11/27 16:55:46 ukai Exp $ */
#include "fm.h"
#include <stdio.h>
#include <pwd.h>
@@ -48,8 +48,12 @@ currentdir()
{
char *path;
#ifdef HAVE_GETCWD
+#ifdef MAXPATHLEN
path = NewAtom_N(char, MAXPATHLEN);
getcwd(path, MAXPATHLEN);
+#else
+ path = getcwd(NULL, 0);
+#endif
#else /* not HAVE_GETCWD */
#ifdef HAVE_GETWD
path = NewAtom_N(char, 1024);