mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-17 17:58:46 +00:00
* etags.c (etags_getcwd): Undo the /bin/pwd change. It may raise
compatibility problems.
This commit is contained in:
parent
a4be31c695
commit
0ff74d81c3
@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
* Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer.
|
* Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char pot_etags_version[] = "@(#) pot revision number is 11.29";
|
char pot_etags_version[] = "@(#) pot revision number is 11.30";
|
||||||
|
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
@ -3661,8 +3661,8 @@ concat (s1, s2, s3)
|
|||||||
guess buffer size in advance. */
|
guess buffer size in advance. */
|
||||||
char *
|
char *
|
||||||
etags_getcwd ()
|
etags_getcwd ()
|
||||||
#ifdef DOS_NT
|
|
||||||
{
|
{
|
||||||
|
#ifdef DOS_NT
|
||||||
char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
|
char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
|
||||||
|
|
||||||
getwd (path);
|
getwd (path);
|
||||||
@ -3674,9 +3674,8 @@ etags_getcwd ()
|
|||||||
*p++ = tolower (*p);
|
*p++ = tolower (*p);
|
||||||
|
|
||||||
return strdup (path);
|
return strdup (path);
|
||||||
}
|
#else /* not DOS_NT */
|
||||||
#elif HAVE_GETCWD /* not DOS_NT */
|
#if HAVE_GETCWD
|
||||||
{
|
|
||||||
int bufsize = 200;
|
int bufsize = 200;
|
||||||
char *path = xnew (bufsize, char);
|
char *path = xnew (bufsize, char);
|
||||||
|
|
||||||
@ -3689,9 +3688,7 @@ etags_getcwd ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
|
||||||
#else /* not DOS_NT and not HAVE_GETCWD */
|
#else /* not DOS_NT and not HAVE_GETCWD */
|
||||||
{
|
|
||||||
struct linebuffer path;
|
struct linebuffer path;
|
||||||
FILE *pipe;
|
FILE *pipe;
|
||||||
|
|
||||||
@ -3702,8 +3699,9 @@ etags_getcwd ()
|
|||||||
pclose (pipe);
|
pclose (pipe);
|
||||||
|
|
||||||
return path.buffer;
|
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
|
/* Return a newly allocated string containing the filename
|
||||||
of FILE relative to the absolute directory DIR (which
|
of FILE relative to the absolute directory DIR (which
|
||||||
|
Loading…
Reference in New Issue
Block a user