[svn] commit: r2185 - /branches/trac221/src/lib/cc/session.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Jun 20 19:05:23 UTC 2010


Author: jinmei
Date: Sun Jun 20 19:05:23 2010
New Revision: 2185

Log:
worked around an interaction issue between ASIO and std library headers.
without this ASIO doesn't work on sol-10.lab.
(note: this is a general problem and should be applied to trunk, too)

Modified:
    branches/trac221/src/lib/cc/session.cc

Modified: branches/trac221/src/lib/cc/session.cc
==============================================================================
--- branches/trac221/src/lib/cc/session.cc (original)
+++ branches/trac221/src/lib/cc/session.cc Sun Jun 20 19:05:23 2010
@@ -19,6 +19,16 @@
 
 #include <stdint.h>
 
+// XXX: there seems to be a strange dependency between ASIO and std library
+// definitions.  On some platforms if we include std headers before ASIO
+// headers unexpected behaviors will happen.
+// A middle term solution is to generalize our local wrapper interface
+// (currently only available for the auth server), where all such portability
+// issues are hidden, and to have other modules use the wrapper.
+#include <asio.hpp>
+#include <asio/error_code.hpp>
+#include <asio/system_error.hpp>
+
 #include <cstdio>
 #include <vector>
 #include <iostream>
@@ -28,10 +38,6 @@
 
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
-
-#include <asio.hpp>
-#include <asio/error_code.hpp>
-#include <asio/system_error.hpp>
 
 #include <exceptions/exceptions.h>
 




More information about the bind10-changes mailing list