summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-30 19:34:26 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-30 19:34:26 +0000
commit3654c7c6ec691c6e660da1d41c125ae020f1d6d9 (patch)
tree4c159cab31e8f5e449e7080e13a34ff8ca94ba4f /lib-src
parentddeab5b302a7fd99aaa0f379032f7f9d6ee3ec21 (diff)
downloademacs-3654c7c6ec691c6e660da1d41c125ae020f1d6d9.tar.gz
[MSDOS]: #include <sys/param.h> for the following.
[MSDOS] (etags_getcwd): Define simple MSDOS version without spawning a shell.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 9bd4bce83f5..bae7e17207a 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -32,6 +32,7 @@ char pot_etags_version[] = "@(#) pot revision number is 10.32";
#ifdef MSDOS
#include <fcntl.h>
+#include <sys/param.h>
#endif /* MSDOS */
#ifdef HAVE_CONFIG_H
@@ -3123,6 +3124,21 @@ concat (s1, s2, s3)
return result;
}
+#ifdef MSDOS
+char *
+etags_getcwd ()
+{
+ char *p, cwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
+ getwd (cwd);
+ p = cwd;
+ while (*p)
+ if (*p == '\\')
+ *p++ = '/';
+ else
+ *p++ = tolower (*p);
+ return strdup (cwd);
+}
+#else /* not MSDOS */
/* Does the same work as the system V getcwd, but does not need to
guess buffer size in advance. Included mostly for compatibility. */
char *
@@ -3155,6 +3171,7 @@ etags_getcwd ()
return buf;
}
+#endif /* not MSDOS */
/* Return a newly allocated string containing the filename
of FILE relative to the absolute directory DIR (which