From a586f5ded57333611d07d524e397d13f93ea1405 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 16 Jul 2001 14:13:06 +0000 Subject: [PATCH] * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the call to chdir on this symbol rather than on __DJGPP__. (CANT_FORK) [__MSDOS__]: Move from here... * defs.h (CANT_FORK) [__MSDOS__]: ...to here. (GLOBAL_CURDIR) [__MSDOS__]: Define. --- gdb/ChangeLog | 8 ++++++++ gdb/cli/cli-cmds.c | 7 +------ gdb/defs.h | 5 +++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f26dc3faf1..69a39750bf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2001-07-16 Eli Zaretskii + + * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the + call to chdir on this symbol rather than on __DJGPP__. + (CANT_FORK) [__MSDOS__]: Move from here... + * defs.h (CANT_FORK) [__MSDOS__]: ...to here. + (GLOBAL_CURDIR) [__MSDOS__]: Define. + 2001-07-16 Orjan Friberg * configure.tgt: Recognise the CRIS architecture. diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 660bbaf13c..a82e877d43 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -39,11 +39,6 @@ #define GDBINIT_FILENAME ".gdbinit" #endif -/* FIXME: this should be auto-configured! */ -#ifdef __MSDOS__ -# define CANT_FORK -#endif - /* From gdb/top.c */ extern void dont_repeat (void); @@ -454,7 +449,7 @@ shell_escape (char *arg, int from_tty) fprintf_unfiltered (gdb_stderr, "%s exited with status %d\n", arg, rc); gdb_flush (gdb_stderr); } -#ifdef __DJGPP__ +#ifdef GLOBAL_CURDIR /* Make sure to return to the directory GDB thinks it is, in case the shell command we just ran changed it. */ chdir (current_directory); diff --git a/gdb/defs.h b/gdb/defs.h index 7872b3b3d7..b54a616634 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -1403,6 +1403,11 @@ extern int use_windows; #endif #endif +#ifdef __MSDOS__ +# define CANT_FORK +# define GLOBAL_CURDIR +#endif + /* Provide default definitions of PIDGET, TIDGET, and MERGEPID. The name ``TIDGET'' is a historical accident. Many uses of TIDGET in the code actually refer to a lightweight process id, i.e, -- 2.11.0