Browse Source

[4243] Addressed review comments

src/lib/asiolink/Makefile.am
    added asio_wrapper.h to list of sources

src/lib/asiolink/asio_wrapper.h
    updated commentary to include GNU/Boost bugs and
    added prominent warning comment
Thomas Markwalder 9 years ago
parent
commit
869c33a5f1
2 changed files with 14 additions and 2 deletions
  1. 1 0
      src/lib/asiolink/Makefile.am
  2. 13 2
      src/lib/asiolink/asio_wrapper.h

+ 1 - 0
src/lib/asiolink/Makefile.am

@@ -18,6 +18,7 @@ lib_LTLIBRARIES = libkea-asiolink.la
 libkea_asiolink_la_LDFLAGS = -no-undefined -version-info 2:0:0
 libkea_asiolink_la_LDFLAGS = -no-undefined -version-info 2:0:0
 
 
 libkea_asiolink_la_SOURCES  = asiolink.h
 libkea_asiolink_la_SOURCES  = asiolink.h
+libkea_asiolink_la_SOURCES += asio_wrapper.h
 libkea_asiolink_la_SOURCES += dummy_io_cb.h
 libkea_asiolink_la_SOURCES += dummy_io_cb.h
 libkea_asiolink_la_SOURCES += interval_timer.cc interval_timer.h
 libkea_asiolink_la_SOURCES += interval_timer.cc interval_timer.h
 libkea_asiolink_la_SOURCES += io_address.cc io_address.h
 libkea_asiolink_la_SOURCES += io_address.cc io_address.h

+ 13 - 2
src/lib/asiolink/asio_wrapper.h

@@ -6,14 +6,20 @@
 #ifndef ASIO_WRAPPER_H
 #ifndef ASIO_WRAPPER_H
 #define ASIO_WRAPPER_H 1
 #define ASIO_WRAPPER_H 1
 
 
+// !!! IMPORTANT !!!!
+// This file must be included anywhere one would normally have included
+// boost/asio.hpp.  Until the issue described below is resolved in some
+// other fashion  asio.hpp should not be included other than through
+// this file.
+//
 // The optimizer as of gcc 5.2.0, may not reliably ensure a single value
 // The optimizer as of gcc 5.2.0, may not reliably ensure a single value
 // returned by boost::system::system_category() within a translation unit
 // returned by boost::system::system_category() within a translation unit
 // when building the header only version of the boost error handling.
 // when building the header only version of the boost error handling.
-// See Trac #4309 for more details. For now we turn off optimization for
+// See Trac #4243 for more details. For now we turn off optimization for
 // header only builds the under the suspect GCC versions.
 // header only builds the under the suspect GCC versions.
 //
 //
 // The issue arises from in-lining the above function, which returns a
 // The issue arises from in-lining the above function, which returns a
-// reference to a local static variable, system_category_const,  This leads
+// reference to a local static variable, system_category_const.  This leads
 // to situations where a construct such as the following:
 // to situations where a construct such as the following:
 //
 //
 // {{{
 // {{{
@@ -35,6 +41,11 @@
 // We're doing the test here, rather than in configure to guard against the
 // We're doing the test here, rather than in configure to guard against the
 // user supplying the header only flag via environment variables.
 // user supplying the header only flag via environment variables.
 //
 //
+// We opened bugs with GNU and BOOST:
+//
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789
+// https://svn.boost.org/trac/boost/ticket/11989
+//
 // @todo Currently, 5.3.0 is the latest released versio of GCC. Version 6.0 is
 // @todo Currently, 5.3.0 is the latest released versio of GCC. Version 6.0 is
 // in development and will need to be tested.
 // in development and will need to be tested.