diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-04-11 15:14:07 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-04-11 15:14:07 +0000 |
commit | 45f90c50d3cd042cbf1696549dcb229cf26dfc13 (patch) | |
tree | 05776fc4d67884c95501a579007b0fbb4bf78d91 /gdb/gdbtk.c | |
parent | faf2dc27143d107ff6117b14dc4a4a4b01352131 (diff) | |
download | gdb-45f90c50d3cd042cbf1696549dcb229cf26dfc13.zip gdb-45f90c50d3cd042cbf1696549dcb229cf26dfc13.tar.gz gdb-45f90c50d3cd042cbf1696549dcb229cf26dfc13.tar.bz2 |
Use F_SETOWN if SIOCSPGRP is not available.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index f3d8204..5d8fcb9 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -105,7 +105,7 @@ gdbtk_fputs (ptr, stream) FILE *stream; { if (result_ptr) - Tcl_DStringAppend (result_ptr, ptr, -1); + Tcl_DStringAppend (result_ptr, (char *)ptr, -1); else { Tcl_DString str; @@ -113,7 +113,7 @@ gdbtk_fputs (ptr, stream) Tcl_DStringInit (&str); Tcl_DStringAppend (&str, "gdbtk_tcl_fputs", -1); - Tcl_DStringAppendElement (&str, ptr); + Tcl_DStringAppendElement (&str, (char *)ptr); Tcl_Eval (interp, Tcl_DStringValue (&str)); Tcl_DStringFree (&str); @@ -1121,7 +1121,14 @@ gdbtk_init () i = getpid(); if (ioctl (x_fd, SIOCSPGRP, &i)) perror_with_name ("gdbtk_init: ioctl SIOCSPGRP failed"); -#endif + +#else +#ifdef F_SETOWN + i = getpid(); + if (fcntl (x_fd, F_SETOWN, i)) + perror_with_name ("gdbtk_init: fcntl F_SETOWN failed"); +#endif /* F_SETOWN */ +#endif /* !SIOCSPGRP */ #else if (ioctl (x_fd, I_SETSIG, S_INPUT|S_RDNORM) < 0) perror_with_name ("gdbtk_init: ioctl I_SETSIG failed"); |