diff options
author | Michael Meissner <gnu@the-meissners.org> | 1996-05-24 14:15:17 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1996-05-24 14:15:17 +0000 |
commit | f64dbcddaf55af68fd430ba6f2b851dd1220099c (patch) | |
tree | 4b169e64620549076b3126e8e622a6cab4a8264b /sim/ppc/hw_pal.c | |
parent | 64a37d3cfc52931b1a279e6266c6f181a392bf6b (diff) | |
download | gdb-f64dbcddaf55af68fd430ba6f2b851dd1220099c.zip gdb-f64dbcddaf55af68fd430ba6f2b851dd1220099c.tar.gz gdb-f64dbcddaf55af68fd430ba6f2b851dd1220099c.tar.bz2 |
Allow psim to be built on go32
Diffstat (limited to 'sim/ppc/hw_pal.c')
-rw-r--r-- | sim/ppc/hw_pal.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c index dd5a097..429f457 100644 --- a/sim/ppc/hw_pal.c +++ b/sim/ppc/hw_pal.c @@ -54,6 +54,10 @@ #include <stdlib.h> #endif +#if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL) +#undef WITH_STDIO +#define WITH_STDIO DO_USE_STDIO +#endif /* Device: @@ -121,6 +125,10 @@ scan_hw_pal(hw_pal_device *hw_pal) } } else { +#if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL) + error ("O_NDELAY, F_GETFL, or F_SETFL not defined"); + +#else /* check for input */ int flags; int status; @@ -150,6 +158,7 @@ scan_hw_pal(hw_pal_device *hw_pal) perror("hw_pal"); return; } +#endif } } @@ -271,7 +280,6 @@ hw_pal_instance_read_callback(device_instance *instance, unsigned_word len) { char *buf_char = (char *)buf; - hw_pal_device *hw_pal = device_instance_data(instance); if (WITH_STDIO == DO_USE_STDIO) { char *line = fgets (buf_char, len, stdin); return ((!line) ? -1 : strlen (buf_char)); |