Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On Fri, Oct 22, 2010 at 01:36:19AM -0500, Norbert Thiebaud wrote:
Completely untested but:

in BDriver.cxx, move
#include "odbc/OFunction.hh" and odbc/OTools.hxx to the end of the
include list, and just before them add #undef BOOL. see if that help
(the more permanent solution is to convert BOOL to sal_Bool and remove
the definition into solar.h.. that is in the 'easy hack' todo list...
but it is quite a big 'easy' task

I tried the attached bool.diff, but it didn't work.
I then tried bool.2.diff instead, which didn't work either.
I've switched to external iodbc for now.

Thanks for the suggestion though,
 Thomas
diff --git a/connectivity/source/drivers/adabas/BDriver.cxx 
b/connectivity/source/drivers/adabas/BDriver.cxx
index 705df3d..58526ed 100644
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -32,9 +32,7 @@
 #include <sal/macros.h>
 #include "adabas/BDriver.hxx"
 #include "adabas/BConnection.hxx"
-#include "odbc/OFunctions.hxx"
 #include <com/sun/star/lang/DisposedException.hpp>
-#include "odbc/OTools.hxx"
 #include "connectivity/dbexception.hxx"
 #include "TConnection.hxx"
 #include "diagnose_ex.h"
@@ -45,6 +43,10 @@
 #include <unotools/localfilehelper.hxx>
 #include "resource/adabas_res.hrc"
 #include "resource/sharedresources.hxx"
+/* newer iodbc headers define BOOL as well, avoid conflict with sal_Bool */
+#undef BOOL
+#include "odbc/OFunctions.hxx"
+#include "odbc/OTools.hxx"
 
 
 #include <memory>
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index f6a0bcb..47b5718 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -54,7 +54,9 @@
 /*   Previous typedefs from before sal convergence are in comments */
 /*   to the right of the new types.                                */
 
+#if !defined(BOOL)
 typedef sal_Bool               BOOL;   /* typedef unsigned char   BOOL; */
+#endif
 typedef sal_uInt8              BYTE;   /* typedef unsigned char   BYTE; */
 typedef sal_uInt16             USHORT; /* typedef unsigned short  USHORT; */
 typedef sal_uIntPtr            ULONG;  /* typedef unsigned long   ULONG; */

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.