Parcourir la source

workaround for ASIO/stdblib interaction (trac #248, partially merged from branches/trac221)

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2187 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya il y a 15 ans
Parent
commit
9a4b12c891
1 fichiers modifiés avec 10 ajouts et 4 suppressions
  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"