ntdll: Adds support for custom serial port baudrates on Mac

Nathan Fearnley nathan.fearnley at slugsource.com
Thu Dec 4 14:40:20 CST 2014


I've tried update the code to be a little more cleanly separated, and fixed
the issue with BOOL. This code really just runs as an exception when a
custom baudrate is requested. Otherwise, it pretty much shares the same
code. If someone can suggest a better way to organize the code, I'd be
happy to implement it.

(Sorry for the duplicate email, Nikolay, I forgot to replay all at first)

On 1 December 2014 at 02:21, Nikolay Sivov <nsivov at codeweavers.com> wrote:

> On 11/29/2014 07:53 PM, Nathan Fearnley wrote:
>
>> Mac OS X supports a special function call for custom baud rates. I have
>> implemented this feature to allow non-standard baud rates.
>> Unfortunately, setting any other parameters using tcsetattr will fail,
>> because it does not support the higher baud rates. In order to work
>> around this, when setting other parameters, the baud rate is temporarily
>> set to 9600, then reset back to custom rate after the changes are
>> complete.
>>
>>
>>
> I can't comment on functional part, but regarding code structure this
> should be better separated imho. Maybe it's even better to duplicate whole
> functions and ifdef them all in case when __APPLE__ is not defined. Also
> don't use C++ 'bool', use BOOL with TRUE/FALSE defines.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20141204/77f8ae19/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adds-custom-baud-rate-support-for-serial-ports-on-Ma.patch
Type: application/octet-stream
Size: 5877 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20141204/77f8ae19/attachment-0001.obj>


More information about the wine-devel mailing list