[Libreoffice] BOOL redefinition problem
Thomas Klausner
wiz at netbsd.org
Fri Oct 22 04:59:24 PDT 2010
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
-------------- next part --------------
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>
-------------- next part --------------
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; */
More information about the LibreOffice
mailing list