[MSDOS] (etags_getcwd): Define simple MSDOS version without spawning a shell.
#ifdef MSDOS
#include <fcntl.h>
+#include <sys/param.h>
#endif /* MSDOS */
#ifdef HAVE_CONFIG_H
return result;
}
\f
+#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 *
return buf;
}
+#endif /* not MSDOS */
/* Return a newly allocated string containing the filename
of FILE relative to the absolute directory DIR (which