Modify

Ticket #3743 (closed Patches: fixed)

Opened 4 years ago

Last modified 4 years ago

support for partially broken compilers/platforms

Reported by: arvid@… Owned by: chris_kohlhoff
Milestone: Boost 1.42.0 Component: asio
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

The following patch may not be complete, but it solved some problems for me on a GCC 2.95 platform.

The patch does 3 things:

  1. Replace #include<limits> with #include <boost/limits.hpp> which emulates a limits header for platforms that don't have one
  2. It #ifdefs out any iostream related code for platforms where BOOST_NO_IOSTREAM is defined
  3. It falls back to a second timer for the default deadline_timer in case BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK is not defined. It that's not defined there is no microsec_clock, and the current code fails to compile.

Attachments

broken_support.diff Download (15.1 KB) - added by arvid@… 4 years ago.
compiler support patch

Change History

Changed 4 years ago by arvid@…

compiler support patch

comment:1 Changed 4 years ago by arvid@…

oh, actually, it does one more thing:

If SIOCATMARK is not defined, it falls back to the posix call which was intended to replace the ioctl, sockatmark().

Also, I did not grep all sources for #include <limits>, I just fixed the ones that broke my build. You might want to look for other instances as well.

comment:2 Changed 4 years ago by chris_kohlhoff

(In [58703]) Include boost/limits.hpp rather than <limits>, to support older compilers. Refs #3743.

comment:3 Changed 4 years ago by chris_kohlhoff

(In [58704]) Drop back to second_clock if microsec_clock is unavailable. Refs #3743.

comment:4 Changed 4 years ago by chris_kohlhoff

(In [58705]) Use sockatmark if SIOCATMARK is not defined. Refs #3743.

comment:5 Changed 4 years ago by chris_kohlhoff

(In [58761]) Disable iostreams-related functionality if BOOST_NO_IOSTREAMS is defined. Refs #3743.

comment:6 Changed 4 years ago by chris_kohlhoff

(In [58782]) Disable handler allocation and invocation hooks on g++ 2.x. Refs #3743.

comment:7 Changed 4 years ago by chris_kohlhoff

(In [58793]) Support platforms that don't define INET6_ADDRSTRLEN. Refs #3743.

comment:8 Changed 4 years ago by chris_kohlhoff

If possible, could you please test the trunk to ensure all the issues have been addressed. Also, how would you describe this gcc 2.95-based target platform (for the release notes)?

comment:9 Changed 4 years ago by chris_kohlhoff

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

(In [58883]) Merge from trunk. Fixes #3743, #3670, #3822.

........

r58670 | chris_kohlhoff | 2010-01-04 23:33:04 +1100 (Mon, 04 Jan 2010) | 2 lines

Fix example to compile with MSVC 10 beta 2.

........

r58671 | chris_kohlhoff | 2010-01-04 23:33:42 +1100 (Mon, 04 Jan 2010) | 2 lines

Fix Win64 warnings.

........

r58703 | chris_kohlhoff | 2010-01-05 22:51:41 +1100 (Tue, 05 Jan 2010) | 3 lines

Include boost/limits.hpp rather than <limits>, to support older compilers. Refs #3743.

........

r58704 | chris_kohlhoff | 2010-01-05 23:20:10 +1100 (Tue, 05 Jan 2010) | 2 lines

Drop back to second_clock if microsec_clock is unavailable. Refs #3743.

........

r58705 | chris_kohlhoff | 2010-01-05 23:50:39 +1100 (Tue, 05 Jan 2010) | 2 lines

Use sockatmark if SIOCATMARK is not defined. Refs #3743.

........

r58740 | chris_kohlhoff | 2010-01-06 13:38:39 +1100 (Wed, 06 Jan 2010) | 2 lines

Use buffer debugging workaround with MSVC 8 only.

........

r58761 | chris_kohlhoff | 2010-01-06 23:27:05 +1100 (Wed, 06 Jan 2010) | 2 lines

Disable iostreams-related functionality if BOOST_NO_IOSTREAMS is defined. Refs #3743.

........

r58762 | chris_kohlhoff | 2010-01-06 23:36:51 +1100 (Wed, 06 Jan 2010) | 2 lines

Apply fix for reported excessive CPU usage under Solaris. Refs #3670.

........

r58782 | chris_kohlhoff | 2010-01-07 09:44:48 +1100 (Thu, 07 Jan 2010) | 2 lines

Disable handler allocation and invocation hooks on g++ 2.x. Refs #3743.

........

r58793 | chris_kohlhoff | 2010-01-08 09:18:16 +1100 (Fri, 08 Jan 2010) | 2 lines

Support platforms that don't define INET6_ADDRSTRLEN. Refs #3743.

........

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.