public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* ser-pipe.c porting to MinGW
@ 2003-02-20 18:13 Fyles, Matthew
  2003-02-21  1:34 ` Christopher Faylor
  2003-02-21 21:46 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: Fyles, Matthew @ 2003-02-20 18:13 UTC (permalink / raw)
  To: gdb

The pipe_open() function written to work for solaris and linux uses
sockets to re-direct the stdin and stdout of the child process.
Unfortunately Microsoft do not allow sockets to be used with the posix
compatibility functions read, write and dup2 under windows. 

Would the most sensible fix be to use standard pipes and change scb->fd
to have scb->rfd and scd->wfd and then put a wrapper around the
ser_unix_readchar and ser_unix_write functions in ser-pipe.c or can
anyone suggest a more sensible fix. This will work on all hosts not just
win32 so in should be a satisfactory solution, my only concern is
renaming the scb->fd.

Any thoughts?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ser-pipe.c porting to MinGW
  2003-02-20 18:13 ser-pipe.c porting to MinGW Fyles, Matthew
@ 2003-02-21  1:34 ` Christopher Faylor
  2003-02-21 21:46 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2003-02-21  1:34 UTC (permalink / raw)
  To: gdb

[reply-to set to gdb]
On Thu, Feb 20, 2003 at 06:12:57PM -0000, Fyles, Matthew wrote:
>The pipe_open() function written to work for solaris and linux uses
>sockets to re-direct the stdin and stdout of the child process.
>Unfortunately Microsoft do not allow sockets to be used with the posix
>compatibility functions read, write and dup2 under windows. 
>
>Would the most sensible fix be to use standard pipes and change scb->fd
>to have scb->rfd and scd->wfd and then put a wrapper around the
>ser_unix_readchar and ser_unix_write functions in ser-pipe.c or can
>anyone suggest a more sensible fix. This will work on all hosts not just
>win32 so in should be a satisfactory solution, my only concern is
>renaming the scb->fd.
>
>Any thoughts?

Since MinGW is not a supported gdb platform, I think someone would have
to step forward to submit a port before we would start worrying about
something like this.

Are you working on getting MinGW ported to the latest version of gdb?

cgf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ser-pipe.c porting to MinGW
  2003-02-20 18:13 ser-pipe.c porting to MinGW Fyles, Matthew
  2003-02-21  1:34 ` Christopher Faylor
@ 2003-02-21 21:46 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2003-02-21 21:46 UTC (permalink / raw)
  To: Fyles, Matthew; +Cc: gdb

> The pipe_open() function written to work for solaris and linux uses
> sockets to re-direct the stdin and stdout of the child process.
> Unfortunately Microsoft do not allow sockets to be used with the posix
> compatibility functions read, write and dup2 under windows. 
> 
> Would the most sensible fix be to use standard pipes and change scb->fd
> to have scb->rfd and scd->wfd and then put a wrapper around the
> ser_unix_readchar and ser_unix_write functions in ser-pipe.c or can
> anyone suggest a more sensible fix. This will work on all hosts not just
> win32 so in should be a satisfactory solution, my only concern is
> renaming the scb->fd.

Ignoring mingw, given that pipe() is so much more portable then 
socket(), a rewrite, wouldn't hurt.

I just don't undersand your comment about ser_unix_*char.

Andrew


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-21 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 18:13 ser-pipe.c porting to MinGW Fyles, Matthew
2003-02-21  1:34 ` Christopher Faylor
2003-02-21 21:46 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).