This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ser-pipe.c porting to MinGW


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]