Date: Wed, 19 May 1999 10:23:46 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Robert Hoehne , djgpp-workers AT delorie DOT com Subject: Re: gdb 4.18 for DJGPP (alpha) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk More GDBmania: - The `shell' command didn't work; diffs below. Note that I think the maintainer should add a test for a working fork and define CANT_FORK automatically instead of using __MSDOS__. - There are no ChangeLog files in gdb418s.zip. I think they should be part of the archive, at least those from the last two years. Sometimes it is impossible to track the reason for some change without having them. *** gdb/command.c~0 Thu Dec 31 21:58:04 1998 --- gdb/command.c Tue May 18 21:22:18 1999 *************** Foundation, Inc., 59 Temple Place - Suit *** 35,40 **** --- 35,45 ---- #include "wait.h" + /* FIXME: this should be auto-configured! */ + #ifdef __MSDOS__ + # define CANT_FORK + #endif + /* Prototypes for local functions */ static void undef_cmd_error PARAMS ((char *, char *)); *************** shell_escape (arg, from_tty) *** 1441,1449 **** int from_tty; { #ifdef CANT_FORK ! /* FIXME: what about errors (I don't know how GO32 system() handles ! them)? */ ! system (arg); #else /* Can fork. */ int rc, status, pid; char *p, *user_shell; --- 1446,1469 ---- int from_tty; { #ifdef CANT_FORK ! /* If ARG is NULL, they want an inferior shell, but `system' just ! reports if the shell is available when passed a NULL arg. */ ! int rc = system (arg ? arg : ""); ! ! if (!arg) ! arg = "inferior shell"; ! ! if (rc == -1) ! { ! fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", arg, ! safe_strerror (errno)); ! gdb_flush (gdb_stderr); ! } ! else if (rc) ! { ! fprintf_unfiltered (gdb_stderr, "%s exited with status %d\n", arg, rc); ! gdb_flush (gdb_stderr); ! } #else /* Can fork. */ int rc, status, pid; char *p, *user_shell;