aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì1995-05-29 12:40:25 +0000
committerFrancesco Potortì1995-05-29 12:40:25 +0000
commit915e30c80995f8714da86a2e6ee6e219f221c28f (patch)
tree0ad4a0e83aa9d9569181254cbfec68c2d3651600 /lib-src
parentf0e72e7909e39598b1337ad3b5ee53e7cf39ae6f (diff)
downloademacs-915e30c80995f8714da86a2e6ee6e219f221c28f.tar.gz
emacs-915e30c80995f8714da86a2e6ee6e219f221c28f.zip
* 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. */
32 * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. 32 * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer.
33 */ 33 */
34 34
35char pot_etags_version[] = "@(#) pot revision number is 11.28"; 35char pot_etags_version[] = "@(#) pot revision number is 11.29";
36 36
37#define TRUE 1 37#define TRUE 1
38#define FALSE 0 38#define FALSE 0
@@ -3661,8 +3661,8 @@ concat (s1, s2, s3)
3661 guess buffer size in advance. */ 3661 guess buffer size in advance. */
3662char * 3662char *
3663etags_getcwd () 3663etags_getcwd ()
3664{
3665#ifdef DOS_NT 3664#ifdef DOS_NT
3665{
3666 char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ 3666 char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
3667 3667
3668 getwd (path); 3668 getwd (path);
@@ -3674,8 +3674,9 @@ etags_getcwd ()
3674 *p++ = tolower (*p); 3674 *p++ = tolower (*p);
3675 3675
3676 return strdup (path); 3676 return strdup (path);
3677#else /* not DOS_NT */ 3677}
3678#if HAVE_GETCWD 3678#elif HAVE_GETCWD /* not DOS_NT */
3679{
3679 int bufsize = 200; 3680 int bufsize = 200;
3680 char *path = xnew (bufsize, char); 3681 char *path = xnew (bufsize, char);
3681 3682
@@ -3688,20 +3689,21 @@ etags_getcwd ()
3688 } 3689 }
3689 3690
3690 return path; 3691 return path;
3692}
3691#else /* not DOS_NT and not HAVE_GETCWD */ 3693#else /* not DOS_NT and not HAVE_GETCWD */
3694{
3692 struct linebuffer path; 3695 struct linebuffer path;
3693 FILE *pipe; 3696 FILE *pipe;
3694 3697
3695 initbuffer (&path); 3698 initbuffer (&path);
3696 pipe = (FILE *) popen ("/bin/pwd 2>/dev/null", "r"); 3699 pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
3697 if (pipe == NULL || readline_internal (&path, pipe) == 0) 3700 if (pipe == NULL || readline_internal (&path, pipe) == 0)
3698 pfatal ("/bin/pwd"); 3701 pfatal ("pwd");
3699 pclose (pipe); 3702 pclose (pipe);
3700 3703
3701 return path.buffer; 3704 return path.buffer;
3702#endif /* not HAVE_GETCWD */
3703#endif /* not DOS_NT */
3704} 3705}
3706#endif /* not DOS_NT and not HAVE_GETCWD */
3705 3707
3706/* Return a newly allocated string containing the filename 3708/* Return a newly allocated string containing the filename
3707 of FILE relative to the absolute directory DIR (which 3709 of FILE relative to the absolute directory DIR (which