]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* command.c (shell_escape, make_command, _initialze_command):
authorSteve Chamberlain <sac@cygnus>
Mon, 4 Jan 1993 15:39:00 +0000 (15:39 +0000)
committerSteve Chamberlain <sac@cygnus>
Mon, 4 Jan 1993 15:39:00 +0000 (15:39 +0000)
don't create or use fork if CANT_FORK is defined.
* serial.h, ser-go32.c: now compiles, but "the obvious problems of
code written for the IBM PC" remain.
* xm-go32.h: define CANT_FORK

gdb/command.c
gdb/ser-go32.c
gdb/serial.h
gdb/xm-go32.h

index 412ff21137c316158682cdbdf225319529f98e69..122c8cad607cda91b85b6e48a5e0458dba260280 100644 (file)
@@ -1136,6 +1136,7 @@ cmd_show_list (list, from_tty, prefix)
   }
 }
 
+#ifndef CANT_FORK
 /* ARGSUSED */
 static void
 shell_escape (arg, from_tty)
@@ -1171,7 +1172,9 @@ shell_escape (arg, from_tty)
   else
     error ("Fork failed");
 }
+#endif
 
+#ifndef CANT_FORK
 static void
 make_command (arg, from_tty)
      char *arg;
@@ -1190,6 +1193,7 @@ make_command (arg, from_tty)
   
   shell_escape (p, from_tty);
 }
+#endif
 
 static void
 show_user_1 (c, stream)
@@ -1239,13 +1243,15 @@ show_user (args, from_tty)
 void
 _initialize_command ()
 {
+#ifndef CANT_FORK
   add_com ("shell", class_support, shell_escape,
           "Execute the rest of the line as a shell command.  \n\
 With no arguments, run an inferior shell.");
-
+#endif
+#ifndef CANT_FORK
   add_com ("make", class_support, make_command,
           "Run the ``make'' program using the rest of the line as arguments.");
-
+#endif
   add_cmd ("user", no_class, show_user, 
           "Show definitions of user defined commands.\n\
 Argument is the name of the user defined command.\n\
index f729d722a50326b0bdd835ceb17ae94c0c008edb..195f1d2cb68a65a6052c90dc7329d421e609fcf1 100644 (file)
@@ -21,6 +21,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    the IBM PC.  FIXME.    -- gnu@cygnus.com, Sep92 */
 
 #include "defs.h"
+
+/* dummy */
+struct ttystate;  
+
 #include "serial.h"
 
 #include <sys/dos.h>
@@ -278,7 +282,9 @@ serial_default_name ()
 
 
 void
-serial_raw ()
+serial_raw (fd, old)
+int fd;
+struct ttystate *old;
 {
   /* Always in raw mode */
 }
@@ -326,7 +332,7 @@ serial_write (str, len)
   dosasync_write(fd, str, len);
 }
 
-int
+void
 serial_close ()
 {
 }
index 1295d18526607d0ec6ffa7223e58678b39e2c8ea..6ac5c0827b67a7e140ae314871a856c3e4063ad9 100644 (file)
@@ -17,6 +17,11 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+#ifdef __GO32__
+
+/* Then you use the asynctsr */
+
+#else
 #ifdef HAVE_TERMIO
 
 #include <termios.h>
@@ -38,6 +43,7 @@ struct ttystate {
 };
 
 #endif /* not HAVE_TERMIO */
+#endif
 /* Return a sensible default name for a serial device, something which
    can be used as an argument to serial_open.  */
    
index 808e5a34f1d37fa8b67838045bcd0b825745b6dd..d8843a8d8efac867e6a07c62073fe9c3ca828176 100644 (file)
@@ -26,3 +26,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Define this lseek(n) != nth byte of file */
 #define LSEEK_NOT_LINEAR
 
+#define CANT_FORK