Re: DOS/Windows-specific code: cli-cmds.c

Christopher Faylor
2001-05-08T07:16:00Z

On Tue, May 08, 2001 at 02:41:53PM +0300, Eli Zaretskii wrote:
>
> * 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.

IMO, it should be moved to 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)?

GLOBAL_CURDIR makes sense to me.

cgf