Patch to reduce warnings from comm.c

Scott W Gifford gifford at umich.edu
Sat May 15 18:51:33 CDT 2004


I have two programs I run under Wine that make use of the serial
ports.  I get this error and fixme when I run then:

    err:comm:GetCommState tcgetattr or ioctl error 'Invalid argument'
    fixme:comm:SetupComm insize 1050 outsize 1050 unimplemented stub

I fixed these two in my copy of Wine with the attached patch.

First, the GetCommState errors were because I was using a pseudo-tty
as the serial port, so setserial didn't work on it.  I modified it to
ignore errors from setserial that set errno==EINVAL.

SetupComm is a function that sets the communications buffer sizes.
Wine doesn't have its own communication buffers, so I filled out this
function to set the kernel's xmit buffer to the requested amount if
possible, and ignore the receive buffer.

With these changes, my programs work properly (they worked properly
before), and I don't get these complaints from Wine.

-----ScottG.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-comm.patch
Type: text/x-patch
Size: 3525 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040515/95e3d1df/wine-comm.bin


More information about the wine-devel mailing list