mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
Use F_SETOWN if SIOCSPGRP is not available.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Apr 11 11:07:12 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
|
* gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, but
|
||||||
|
F_SETOWN is, use that.
|
||||||
|
|
||||||
Mon Apr 10 18:31:57 1995 Stan Shebs <shebs@andros.cygnus.com>
|
Mon Apr 10 18:31:57 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
Merge in support for Mac MPW as a host.
|
Merge in support for Mac MPW as a host.
|
||||||
|
13
gdb/gdbtk.c
13
gdb/gdbtk.c
@ -105,7 +105,7 @@ gdbtk_fputs (ptr, stream)
|
|||||||
FILE *stream;
|
FILE *stream;
|
||||||
{
|
{
|
||||||
if (result_ptr)
|
if (result_ptr)
|
||||||
Tcl_DStringAppend (result_ptr, ptr, -1);
|
Tcl_DStringAppend (result_ptr, (char *)ptr, -1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Tcl_DString str;
|
Tcl_DString str;
|
||||||
@ -113,7 +113,7 @@ gdbtk_fputs (ptr, stream)
|
|||||||
Tcl_DStringInit (&str);
|
Tcl_DStringInit (&str);
|
||||||
|
|
||||||
Tcl_DStringAppend (&str, "gdbtk_tcl_fputs", -1);
|
Tcl_DStringAppend (&str, "gdbtk_tcl_fputs", -1);
|
||||||
Tcl_DStringAppendElement (&str, ptr);
|
Tcl_DStringAppendElement (&str, (char *)ptr);
|
||||||
|
|
||||||
Tcl_Eval (interp, Tcl_DStringValue (&str));
|
Tcl_Eval (interp, Tcl_DStringValue (&str));
|
||||||
Tcl_DStringFree (&str);
|
Tcl_DStringFree (&str);
|
||||||
@ -1121,7 +1121,14 @@ gdbtk_init ()
|
|||||||
i = getpid();
|
i = getpid();
|
||||||
if (ioctl (x_fd, SIOCSPGRP, &i))
|
if (ioctl (x_fd, SIOCSPGRP, &i))
|
||||||
perror_with_name ("gdbtk_init: ioctl SIOCSPGRP failed");
|
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
|
#else
|
||||||
if (ioctl (x_fd, I_SETSIG, S_INPUT|S_RDNORM) < 0)
|
if (ioctl (x_fd, I_SETSIG, S_INPUT|S_RDNORM) < 0)
|
||||||
perror_with_name ("gdbtk_init: ioctl I_SETSIG failed");
|
perror_with_name ("gdbtk_init: ioctl I_SETSIG failed");
|
||||||
|
Reference in New Issue
Block a user