aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/connection-factory.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-30 15:51:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-30 15:51:23 +0200
commit1692b3e82521e7d73a908f532eced90491e1eded (patch)
treec45272faba67485f3702395f43282a81a981cf5f /odb/mysql/connection-factory.cxx
parent4452be925b749572f0e3edcb21e9af818647eb55 (diff)
Support for automake and VC++ builds
Diffstat (limited to 'odb/mysql/connection-factory.cxx')
-rw-r--r--odb/mysql/connection-factory.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/odb/mysql/connection-factory.cxx b/odb/mysql/connection-factory.cxx
index db7a702..c490048 100644
--- a/odb/mysql/connection-factory.cxx
+++ b/odb/mysql/connection-factory.cxx
@@ -3,14 +3,25 @@
// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h> // CR_UNKNOWN_ERROR
+#include <odb/mysql/details/config.hxx>
+
+#ifdef LIBODB_MYSQL_INCLUDE_SHORT
+# ifdef _WIN32
+# include <winsock2.h>
+# endif
+# include <mysql.h>
+# include <errmsg.h> // CR_UNKNOWN_ERROR
+#else
+# include <mysql/mysql.h>
+# include <mysql/errmsg.h>
+#endif
#include <odb/mysql/connection-factory.hxx>
#include <odb/mysql/exceptions.hxx>
#include <odb/details/tls.hxx>
#include <odb/details/lock.hxx>
+#include <odb/details/config.hxx> // ODB_THREADS_NONE
using namespace std;
@@ -24,6 +35,7 @@ namespace odb
{
struct mysql_init
{
+#ifndef ODB_THREADS_NONE
mysql_init ()
{
if (my_thread_init ())
@@ -37,6 +49,7 @@ namespace odb
{
my_thread_end ();
}
+#endif
};
static ODB_TLS_OBJECT (mysql_init) mysql_init_;