Opened 13 years ago

Closed 13 years ago

#3743 closed Patches (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (10)

by arvid@…, 13 years ago

Attachment: broken_support.diff added

compiler support patch

comment:1 by arvid@…, 13 years ago

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 by chris_kohlhoff, 13 years ago

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

comment:3 by chris_kohlhoff, 13 years ago

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

comment:4 by chris_kohlhoff, 13 years ago

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

comment:5 by chris_kohlhoff, 13 years ago

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

comment:6 by chris_kohlhoff, 13 years ago

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

comment:7 by chris_kohlhoff, 13 years ago

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

comment:8 by chris_kohlhoff, 13 years ago

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 by chris_kohlhoff, 13 years ago

Resolution: fixed
Status: newclosed

(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.

........

Note: See TracTickets for help on using tickets.