From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Fernando Nasser Cc: gdb-patches@sources.redhat.com, cgf@redhat.com Subject: Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c Date: Thu, 12 Jul 2001 00:50:00 -0000 Message-id: <200107120751.KAA17564@is.elta.co.il> References: <200106211647.MAA03041@houston.candd.org> X-SW-Source: 2001-07/msg00285.html > Date: Thu, 21 Jun 2001 12:47:14 -0400 > From: David Taylor > > Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT) > From: Eli Zaretskii > > > Date: Tue, 8 May 2001 14:41:53 +0300 (IDT) > > From: Eli Zaretskii > > > > * cli-cmds.c: > > > > /* FIXME: this should be auto-configured! */ > > #ifdef __MSDOS__ > > # define CANT_FORK > > #endif > > > > This seems to cry for either an Autoconf test (based on whether the > > compiler defines __MSDOS__ or not) or perhaps the whole snippet should > > be moved to config/i386/xm-go32.h. > > > > > > * cli-cmds.c:shell_escape() > > > > #ifdef __DJGPP__ > > /* Make sure to return to the directory GDB thinks it is, in case the > > shell command we just ran changed it. */ > > chdir (current_directory); > > #endif > > > > This code is there because the current working directory is a global > > notion (as opposed to being private to each process on Posix > > systems). Windows ports, at least the non-Cygwin ones, probably want > > this as well. Suggestions how to test this, anyone? Should we define > > a GLOBAL_CURDIR macro (zero by default)? > > Here's the patch to fix these two issues. Okay to commit? > > > 2001-06-10 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. > > Sorry for the delay. The defs.h part is approved. Fernando, could you please review this? Thanks.