From: Stan Shebs Date: Sat, 15 Apr 1995 21:22:14 +0000 (+0000) Subject: * mpw-make.in (init.c): Don't try to do symbolic {o} in sed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8befb594699839bf0d4af2f399b71ceb84a3bb2c;p=binutils-gdb.git * mpw-make.in (init.c): Don't try to do symbolic {o} in sed command, not allowed by some version of MPW Make. * ser-mac.c (mac-setbaudrate): Make it actually set baud rates. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 750591a5dd6..8816458e4b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Sat Apr 15 14:15:14 1995 Stan Shebs + + * mpw-make.in (init.c): Don't try to do symbolic {o} in sed + command, not allowed by some version of MPW Make. + * ser-mac.c (mac-setbaudrate): Make it actually set baud rates. + Sat Apr 15 14:05:09 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * alpha-tdep.c (alpha_push_arguments): Fix typo (TYPE_VALUE -> diff --git a/gdb/mpw-make.in b/gdb/mpw-make.in index a0acf8f1eeb..9e58f9976a7 100644 --- a/gdb/mpw-make.in +++ b/gdb/mpw-make.in @@ -719,7 +719,17 @@ uninstall \Option-f force # Formatting conventions: The name of the _initialize_* routines must start # in column zero, and must not be inside #if. +# FIXME: the last sed substitution 's/^://' should really be 's/^{o}//', +# but only some versions of Make (like 4.0d2, but NOT 4.0b6) will make +# the substitution. + "{o}"init.c \Option-f {OBS} {TSOBS} + If "{o}" =~ /:/ + Echo objdir is : + Else + Echo Aack, objdir is not : + Exit -5 + End If Echo Making "{o}"init.c Delete -i -y "{o}"init.c init.c-tmp Echo '/* Do not modify this file. */' >init.c-tmp @@ -740,7 +750,7 @@ uninstall \Option-f force -e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \Option-d -e 's/\.gc\.o/.c/' \Option-d -e 's/\.c\.o/.c/' \Option-d - -e 's/^{o}//'`" + -e 's/^://'`" If "{filename}" != "" sed <"{s}""{filename}" >>init.c-tmp -n \Option-d -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' diff --git a/gdb/ser-mac.c b/gdb/ser-mac.c index 98a503c297a..250375ac7ac 100644 --- a/gdb/ser-mac.c +++ b/gdb/ser-mac.c @@ -239,12 +239,46 @@ mac_print_tty_state (scb, ttystate) return; } +/* If there is a tricky formula to relate real baud rates + to what the serial driver wants, we should use it. Until + we get one, this table will have to do. */ + +static struct { + int real_rate; + int bits; +} mac_baud_rate_table[] = { + { 57600, baud57600 }, + { 38400, 2 /* ??? */ }, + { 19200, baud19200 }, + { 9600, baud9600 }, + { 7200, baud7200 }, + { 4800, baud4800 }, + { 3600, baud3600 }, + { 2400, baud2400 }, + { 1800, baud1800 }, + { 1200, baud1200 }, + { 600, baud600 }, + { 300, baud300 }, + { 0, 0 } +}; + static int mac_set_baud_rate (scb, rate) serial_t scb; int rate; { - return 0; + int i, bits; + + for (i = 0; mac_baud_rate_table[i].real_rate != 0; ++i) + { + if (mac_baud_rate_table[i].real_rate == rate) + { + bits = mac_baud_rate_table[i].bits; + break; + } + } + SerReset (input_refnum, stop10|noParity|data8|bits); + SerReset (output_refnum, stop10|noParity|data8|bits); } static int