From: Eli Zaretskii <eliz@is.elta.co.il>
To: gdb-patches@sources.redhat.com
Cc: Christopher Faylor <cgf@redhat.com>
Subject: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
Date: Sun, 10 Jun 2001 06:27:00 -0000 [thread overview]
Message-ID: <200106101328.QAA08000@is.elta.co.il> (raw)
In-Reply-To: <200105081141.OAA06131@is.elta.co.il>
> Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> From: Eli Zaretskii <eliz@is.elta.co.il>
>
> * 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 <eliz@is.elta.co.il>
* 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/defs.h~0 Mon Jun 4 09:38:04 2001
+++ gdb/defs.h Sun Jun 10 16:08:22 2001
@@ -1372,6 +1372,11 @@
#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,
--- gdb/cli/cli-cmds.c~0 Wed Jun 6 12:25:24 2001
+++ gdb/cli/cli-cmds.c Sun Jun 10 16:10:18 2001
@@ -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 @@
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);
next prev parent reply other threads:[~2001-06-10 6:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010503211502.21716.qmail@web6401.mail.yahoo.com>
[not found] ` <3AF1DAA0.3060702@cygnus.com>
[not found] ` <200105071610.TAA24144@is.elta.co.il>
2001-05-13 1:29 ` [RFA] Remove OS-specific defines (was: _WIN32?) Eli Zaretskii
2001-05-13 7:09 ` Fernando Nasser
2001-05-13 23:34 ` Eli Zaretskii
2001-05-14 13:18 ` Andrew Cagney
2001-06-04 0:46 ` Eli Zaretskii
[not found] ` <1010507173855.ZM18890@ocotillo.lan>
2001-05-07 11:24 ` Eli Zaretskii
2001-06-10 6:28 ` Eli Zaretskii
2001-06-12 17:14 ` Christopher Faylor
2001-06-13 2:08 ` Eli Zaretskii
[not found] ` <200105071609.TAA24129@is.elta.co.il>
[not found] ` <200105081141.OAA06131@is.elta.co.il>
2001-06-10 6:27 ` Eli Zaretskii [this message]
2001-06-21 9:47 [RFA] Re: DOS/Windows-specific code: cli-cmds.c David Taylor
2001-06-21 11:44 ` Eli Zaretskii
2001-07-12 0:50 ` Eli Zaretskii
2001-07-12 5:29 ` Fernando Nasser
2001-07-12 8:07 ` Eli Zaretskii
2001-07-12 10:21 ` Christopher Faylor
2001-07-12 11:22 ` Eli Zaretskii
2001-07-12 11:27 ` Christopher Faylor
2001-07-12 15:38 ` Fernando Nasser
2001-07-16 7:14 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200106101328.QAA08000@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=cgf@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox