summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>1995-05-29 12:40:25 +0000
committerFrancesco Potortì <pot@gnu.org>1995-05-29 12:40:25 +0000
commit2b7d2569ed4d70925c67888175f3372c31743809 (patch)
tree915606fed67d14c6ace9086d79947274a6ba3091 /lib-src
parent4a6d15450cf2aa038258558650300a489e906f30 (diff)
downloademacs-2b7d2569ed4d70925c67888175f3372c31743809.tar.gz
* etags.c (etags_getcwd): Undo the /bin/pwd change. It may raise
compatibility problems.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f83a64658e0..15648bb5047 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
* Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer.
*/
-char pot_etags_version[] = "@(#) pot revision number is 11.28";
+char pot_etags_version[] = "@(#) pot revision number is 11.29";
#define TRUE 1
#define FALSE 0
@@ -3661,8 +3661,8 @@ concat (s1, s2, s3)
guess buffer size in advance. */
char *
etags_getcwd ()
-{
#ifdef DOS_NT
+{
char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
getwd (path);
@@ -3674,8 +3674,9 @@ etags_getcwd ()
*p++ = tolower (*p);
return strdup (path);
-#else /* not DOS_NT */
-#if HAVE_GETCWD
+}
+#elif HAVE_GETCWD /* not DOS_NT */
+{
int bufsize = 200;
char *path = xnew (bufsize, char);
@@ -3688,20 +3689,21 @@ etags_getcwd ()
}
return path;
+}
#else /* not DOS_NT and not HAVE_GETCWD */
+{
struct linebuffer path;
FILE *pipe;
initbuffer (&path);
- pipe = (FILE *) popen ("/bin/pwd 2>/dev/null", "r");
+ pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
if (pipe == NULL || readline_internal (&path, pipe) == 0)
- pfatal ("/bin/pwd");
+ pfatal ("pwd");
pclose (pipe);
return path.buffer;
-#endif /* not HAVE_GETCWD */
-#endif /* not DOS_NT */
}
+#endif /* not DOS_NT and not HAVE_GETCWD */
/* Return a newly allocated string containing the filename
of FILE relative to the absolute directory DIR (which