aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-11-22 01:29:29 +0000
committerJohn Gilmore <gnu@cygnus>1991-11-22 01:29:29 +0000
commitf7402c04fa90ad4691e0badc98d034c5f1ef7cda (patch)
treeff118128a714b456a4b0a0167b42024ed8a0cc3a /gdb/main.c
parent82f0459e2c7d63dd7f008af42516c53458da5adf (diff)
downloadgdb-f7402c04fa90ad4691e0badc98d034c5f1ef7cda.zip
gdb-f7402c04fa90ad4691e0badc98d034c5f1ef7cda.tar.gz
gdb-f7402c04fa90ad4691e0badc98d034c5f1ef7cda.tar.bz2
* main.c: Use getcwd rather than getwd.
* standalone.c: Fake getcwd rather than getwd. * xm-*.h: Remove fake values of MAXPATHLEN.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/main.c b/gdb/main.c
index e36d730..0c18627 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -141,7 +141,7 @@ FILE *instream;
char *current_directory;
/* The directory name is actually stored here (usually). */
-static char dirbuf[MAXPATHLEN];
+static char dirbuf[1024];
/* Function to call before reading a command, if nonzero.
The function receives two args: an input stream,
@@ -358,7 +358,7 @@ main (argc, argv)
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
instream = stdin;
- getwd (dirbuf);
+ getcwd (dirbuf, sizeof (dirbuf));
current_directory = dirbuf;
#ifdef SET_STACK_LIMIT_HUGE
@@ -1672,7 +1672,7 @@ pwd_command (args, from_tty)
int from_tty;
{
if (args) error ("The \"pwd\" command does not take an argument: %s", args);
- getwd (dirbuf);
+ getcwd (dirbuf, sizeof (dirbuf));
if (strcmp (dirbuf, current_directory))
printf ("Working directory %s\n (canonically %s).\n",