Opened 10 years ago

Last modified 3 years ago

#2917 reopened Library Submissions

BOOST_ASIO_DISABLE_SERIAL_PORT doesn't work as expected

Reported by: dustin@… Owned by: chris_kohlhoff
Milestone: Website 1.X Component: xpressive
Version: Boost.Build-M3 Severity: Not Applicable
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 (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 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 10 years ago by Dustin Spicuzza <dustin@…>

comment:2 Changed 10 years ago by chris_kohlhoff

Resolution: fixed
Status: newclosed

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

comment:3 Changed 10 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.

........

comment:4 Changed 3 years ago by Smithe574

Component: asioxpressive
Milestone: Boost 1.39.0Website 1.X
Resolution: fixed
Severity: ShowstopperNot Applicable
Status: closedreopened
Type: BugsLibrary Submissions
Version: Boost 1.38.0Boost.Build-M3

I've been absent for a while, but now I remember why I used to love this website. Thanks, I'll try and check back more frequently. How frequently you update your site? deegaffdfgddkdgb

Note: See TracTickets for help on using tickets.