diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-02-25 16:37:32 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-02-25 16:37:32 +0000 |
commit | c24b1e075163881405f1578b5e8f0cb0d0fa4e17 (patch) | |
tree | 78a76682575abf37018d9cc82f4787482258e17a /gdb | |
parent | 99a9011fbe35b9bfaf34d0953ff595724e7cca28 (diff) | |
download | gdb-c24b1e075163881405f1578b5e8f0cb0d0fa4e17.tar.gz |
2000-02-25 Fernando Nasser <fnasser@cygnus.com>
From: Thomas Zenker <thz@Lennartz-electronic.DE>
* rdi-share/hsys.c: to compile under 4.4BSD derived systems (FreeBSD,
NetBSD...) sys_errlist should not be declared in hsys.c.
NEED_SYSERRLIST is set already by configure, so we can use it.
* rdi-share/unixcomm.c: 4.4BSD derived systems define BSD, but are
posix compliant and we should not work with the old compatibility
stuff. Because of that I undef BSD in case of FBSD etc and include
sys/ioctl to get the flags.
* rdi-share/unixcomm.c: If the TIOCEXCL flags exists set serial line
for exclusive use.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/rdi-share/hsys.c | 2 | ||||
-rw-r--r-- | gdb/rdi-share/unixcomm.c | 12 |
3 files changed, 27 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59dd921e6e8..ab7d54418c0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2000-02-25 Fernando Nasser <fnasser@cygnus.com> + + From: Thomas Zenker <thz@Lennartz-electronic.DE> + * rdi-share/hsys.c: to compile under 4.4BSD derived systems (FreeBSD, + NetBSD...) sys_errlist should not be declared in hsys.c. + NEED_SYSERRLIST is set already by configure, so we can use it. + * rdi-share/unixcomm.c: 4.4BSD derived systems define BSD, but are + posix compliant and we should not work with the old compatibility + stuff. Because of that I undef BSD in case of FBSD etc and include + sys/ioctl to get the flags. + * rdi-share/unixcomm.c: If the TIOCEXCL flags exists set serial line + for exclusive use. + 2000-02-24 Kevin Buettner <kevinb@redhat.com> * ppc-linux-tdep.c (ppc_sysv_abi_push_arguments): Put address diff --git a/gdb/rdi-share/hsys.c b/gdb/rdi-share/hsys.c index ef9cdeb6f50..b9837e03897 100644 --- a/gdb/rdi-share/hsys.c +++ b/gdb/rdi-share/hsys.c @@ -125,8 +125,10 @@ static void DebugCheckNullTermString(char *prefix, bool nl, } } +#ifdef NEED_SYSERRLIST extern int sys_nerr; extern char *sys_errlist[]; +#endif static char *DebugStrError(int last_errno) { diff --git a/gdb/rdi-share/unixcomm.c b/gdb/rdi-share/unixcomm.c index ce3333918a4..ee11e51161f 100644 --- a/gdb/rdi-share/unixcomm.c +++ b/gdb/rdi-share/unixcomm.c @@ -36,6 +36,11 @@ #include <sys/types.h> #include <sys/time.h> +#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi) +#undef BSD +#include <sys/ioctl.h> +#endif + #ifdef sun # include <sys/ioccom.h> # ifdef __svr4__ @@ -253,6 +258,13 @@ extern int Unix_OpenSerial(const char *name) perror("open"); return -1; } +#ifdef TIOCEXCL + if (ioctl(serpfd, TIOCEXCL) < 0) { + close(serpfd); + perror("ioctl: TIOCEXCL"); + return -1; + } +#endif return 0; } |