Browse Source

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)


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac221@2185 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya 15 years ago
parent
commit
763bbb7667
1 changed files with 10 additions and 4 deletions
  1. 10 4
      src/lib/cc/session.cc

+ 10 - 4
src/lib/cc/session.cc

@@ -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>
@@ -29,10 +39,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>
 
 #include "data.h"