Modify

Ticket #2917 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

BOOST_ASIO_DISABLE_SERIAL_PORT doesn't work as expected

Reported by: dustin@… Owned by: chris_kohlhoff
Milestone: Boost 1.39.0 Component: asio
Version: Boost 1.38.0 Severity: Showstopper
Keywords: Cc:

Description

The expected result is that none of the serial port code would be included. This does not happen, many of the serial port related headers get included and potentially cause many compile errors (for example, if your platform doesn't have termios).

Obviously there are a number of different ways to handle this problem, I can provide a patch if you like, but placement of the checks is just a matter of opinion (it seems like one would want to just put the check in the top level serial port files after boost/config.hpp is included, however).

Attachments

boost_1_38_0.asio-serial.vxworks.patch Download (1.5 KB) - added by Dustin Spicuzza <dustin@…> 5 years ago.

Change History

comment:1 Changed 5 years ago by Dustin Spicuzza <dustin@…>

I've attached a patch that removes all serial port code if BOOST_ASIO_DISABLE_SERIAL_PORT is defined.

This patch is required for vxWorks to compile correctly, due to no termios support.

Changed 5 years ago by Dustin Spicuzza <dustin@…>

comment:2 Changed 5 years ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

(In [52478]) Don't include termios.h unless BOOST_ASIO_HAS_SERIAL_PORT is defined. Fixes #2917.

comment:3 Changed 5 years ago by chris_kohlhoff

(In [52494]) Merged revisions 52465,52478 from trunk

........

r52465 | chris_kohlhoff | 2009-04-18 23:27:53 +1000 (Sat, 18 Apr 2009) | 3 lines

POSIX allows successful system calls to modify errno, so always clear the error_code if the result indicates success. Fixes #2953.

........

r52478 | chris_kohlhoff | 2009-04-19 14:15:17 +1000 (Sun, 19 Apr 2009) | 3 lines

Don't include termios.h unless BOOST_ASIO_HAS_SERIAL_PORT is defined. Fixes #2917.

........

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.