From d3a1c61c2c10d952c7a186d367b42a1ea1b3e946 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Sep 2010 09:31:53 +0200 Subject: Rework MySQL header inclusion --- odb/mysql/connection-factory.cxx | 15 +-------------- odb/mysql/connection.hxx | 13 +------------ odb/mysql/database.hxx | 13 +------------ odb/mysql/exceptions.cxx | 13 +------------ odb/mysql/exceptions.hxx | 13 +------------ odb/mysql/mysql-types.hxx | 19 +++++++++++++++++++ odb/mysql/mysql.hxx | 15 ++++++++++----- odb/mysql/query.hxx | 13 +------------ odb/mysql/statement.cxx | 13 +------------ odb/mysql/statement.hxx | 13 +------------ odb/mysql/traits.hxx | 13 +------------ odb/mysql/transaction-impl.cxx | 13 +------------ 12 files changed, 39 insertions(+), 127 deletions(-) create mode 100644 odb/mysql/mysql-types.hxx diff --git a/odb/mysql/connection-factory.cxx b/odb/mysql/connection-factory.cxx index 2bfd566..41ff2fd 100644 --- a/odb/mysql/connection-factory.cxx +++ b/odb/mysql/connection-factory.cxx @@ -3,20 +3,7 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -# include // CR_UNKNOWN_ERROR -#else -# include -# include -#endif - +#include #include #include diff --git a/odb/mysql/connection.hxx b/odb/mysql/connection.hxx index b00be75..7bbc335 100644 --- a/odb/mysql/connection.hxx +++ b/odb/mysql/connection.hxx @@ -8,22 +8,11 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - #include #include +#include #include #include diff --git a/odb/mysql/database.hxx b/odb/mysql/database.hxx index b10b037..9f07f03 100644 --- a/odb/mysql/database.hxx +++ b/odb/mysql/database.hxx @@ -8,23 +8,12 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - #include #include // std::auto_ptr #include +#include #include #include #include diff --git a/odb/mysql/exceptions.cxx b/odb/mysql/exceptions.cxx index 636c223..1c535dd 100644 --- a/odb/mysql/exceptions.cxx +++ b/odb/mysql/exceptions.cxx @@ -3,21 +3,10 @@ // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include // CR_OUT_OF_MEMORY -#else -# include -#endif - #include // std::bad_alloc #include +#include #include using namespace std; diff --git a/odb/mysql/exceptions.hxx b/odb/mysql/exceptions.hxx index 834a4d6..f9d3730 100644 --- a/odb/mysql/exceptions.hxx +++ b/odb/mysql/exceptions.hxx @@ -8,22 +8,11 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - #include #include +#include #include #include diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx new file mode 100644 index 0000000..620904f --- /dev/null +++ b/odb/mysql/mysql-types.hxx @@ -0,0 +1,19 @@ +// file : odb/mysql/mysql-types.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_MYSQL_MYSQL_TYPES_HXX +#define ODB_MYSQL_MYSQL_TYPES_HXX + +#include + +typedef char my_bool; + +#ifdef LIBODB_MYSQL_INCLUDE_SHORT +# include +#else +# include +#endif + +#endif // ODB_MYSQL_MYSQL_TYPES_HXX diff --git a/odb/mysql/mysql.hxx b/odb/mysql/mysql.hxx index 2988870..962eb5a 100644 --- a/odb/mysql/mysql.hxx +++ b/odb/mysql/mysql.hxx @@ -1,22 +1,27 @@ -/* file : odb/mysql/mysql.hxx - * author : Boris Kolpackov - * copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC - * license : GNU GPL v2; see accompanying LICENSE file - */ +// file : odb/mysql/mysql.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file #ifndef ODB_MYSQL_MYSQL_HXX #define ODB_MYSQL_MYSQL_HXX #include +#include + #ifdef _WIN32 # include #endif #ifdef LIBODB_MYSQL_INCLUDE_SHORT # include +# include +# include #else # include +# include +# include #endif #endif // ODB_MYSQL_MYSQL_HXX diff --git a/odb/mysql/query.hxx b/odb/mysql/query.hxx index 7d2d2d4..4e0320f 100644 --- a/odb/mysql/query.hxx +++ b/odb/mysql/query.hxx @@ -8,24 +8,13 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - #include #include #include // std::size_t #include +#include #include #include #include diff --git a/odb/mysql/statement.cxx b/odb/mysql/statement.cxx index 95edbbd..0cab7cc 100644 --- a/odb/mysql/statement.cxx +++ b/odb/mysql/statement.cxx @@ -3,18 +3,7 @@ // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include // ER_DUP_ENTRY, ER_LOCK_DEADLOCK -#else -# include -#endif - +#include #include #include #include diff --git a/odb/mysql/statement.hxx b/odb/mysql/statement.hxx index 78681a2..05deb4d 100644 --- a/odb/mysql/statement.hxx +++ b/odb/mysql/statement.hxx @@ -8,18 +8,6 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - #include #include #include // std::size_t @@ -28,6 +16,7 @@ #include #include +#include #include #include diff --git a/odb/mysql/traits.hxx b/odb/mysql/traits.hxx index a520d1b..f05e04e 100644 --- a/odb/mysql/traits.hxx +++ b/odb/mysql/traits.hxx @@ -8,24 +8,13 @@ #include -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include // MYSQL_TIME, used in custom specializations. -#else -# include -#endif - #include #include // std::size_t #include #include +#include #include diff --git a/odb/mysql/transaction-impl.cxx b/odb/mysql/transaction-impl.cxx index 04493e6..df41015 100644 --- a/odb/mysql/transaction-impl.cxx +++ b/odb/mysql/transaction-impl.cxx @@ -3,18 +3,7 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include - -#ifdef _WIN32 -# include -#endif - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include -#else -# include -#endif - +#include #include #include #include -- cgit v1.1