aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-30 19:34:26 +0000
committerRichard M. Stallman1994-04-30 19:34:26 +0000
commit88f125fc73f661db5fb2d791e805d517f3ece93f (patch)
tree0e4ccf1bdb730db6230eeec78ef0610677282f83 /lib-src
parent677159d6a5d2a27e94a49b0bc3b38f1c3cea64b8 (diff)
downloademacs-88f125fc73f661db5fb2d791e805d517f3ece93f.tar.gz
emacs-88f125fc73f661db5fb2d791e805d517f3ece93f.zip
[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";
32 32
33#ifdef MSDOS 33#ifdef MSDOS
34#include <fcntl.h> 34#include <fcntl.h>
35#include <sys/param.h>
35#endif /* MSDOS */ 36#endif /* MSDOS */
36 37
37#ifdef HAVE_CONFIG_H 38#ifdef HAVE_CONFIG_H
@@ -3123,6 +3124,21 @@ concat (s1, s2, s3)
3123 return result; 3124 return result;
3124} 3125}
3125 3126
3127#ifdef MSDOS
3128char *
3129etags_getcwd ()
3130{
3131 char *p, cwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
3132 getwd (cwd);
3133 p = cwd;
3134 while (*p)
3135 if (*p == '\\')
3136 *p++ = '/';
3137 else
3138 *p++ = tolower (*p);
3139 return strdup (cwd);
3140}
3141#else /* not MSDOS */
3126/* Does the same work as the system V getcwd, but does not need to 3142/* Does the same work as the system V getcwd, but does not need to
3127 guess buffer size in advance. Included mostly for compatibility. */ 3143 guess buffer size in advance. Included mostly for compatibility. */
3128char * 3144char *
@@ -3155,6 +3171,7 @@ etags_getcwd ()
3155 3171
3156 return buf; 3172 return buf;
3157} 3173}
3174#endif /* not MSDOS */
3158 3175
3159/* Return a newly allocated string containing the filename 3176/* Return a newly allocated string containing the filename
3160 of FILE relative to the absolute directory DIR (which 3177 of FILE relative to the absolute directory DIR (which