[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN][PATCH]workaround for DBTYPE declaration conflict

From: Joseph Galbraith <galb_at_vandyke.com>
Date: 2005-08-20 17:09:54 CEST

Stefan Fuhrmann wrote:
> Hi dev,
>
> I think this should also be committed since the
> error message otherwise produced in VC8.0 is
> hard to track down to its cause. Perhaps a
> "FIXME" should be added.
>
> [[[
> !!! FIXME !!!
>
> This is a workaround for the following problem
> in VC8.0 (VS.NET2005):
> the OLEDB headers declare DBTYPE as db.h
> does with completely different type semantics.
> ]]]
>
>
> ------------------------------------------------------------------------
>
> Index: TortoiseProc/stdafx.h
> ===================================================================
> --- TortoiseProc/stdafx.h (revision 4159)
> +++ TortoiseProc/stdafx.h (working copy)
> @@ -82,7 +82,13 @@
> #include "..\..\ext\apr\include\apr_version.h"
> #include "..\..\ext\apr-iconv\include\api_version.h"
> #include "..\..\ext\apr-util\include\apu_version.h"
> +#if _MSC_VER < 1400
> #include "..\..\ext\Subversion\db4-win32\include\db.h"
> +#else
> +#define DB_VERSION_MAJOR 4
> +#define DB_VERSION_MINOR 3
> +#define DB_VERSION_PATCH 28
> +#endif
> #include "..\..\ext\neon\src\config.h"
> #include "..\..\..\common\openssl\inc32\openssl\opensslv.h"
> #include "..\..\..\common\zlib\zlib.h"

These three lines are the only lines we need?

Probably the ultimate fix lies within db.h... so we'll
want to report the problem to sleepycat.

However, for TSVN, a workaround that isn't too gross might
be something like:

A new cpp file which _does not_ use stdafx.h
and contains:

#include "..\..\ext\Subversion\db4-win32\include\db.h"

const int g_iDB_VERSION_MAJOR = DB_VERSION_MAJOR;
const int g_iDB_VERSION_MINOR = DB_VERSION_MINOR;
const int g_iDB_VERSION_PATCH = DB_VERSION_PATCH;

Then, remove the include and the patched code from
stdafx.h and replace it with:

extern const int g_iDB_VERSION_MAJOR;
extern const int g_iDB_VERSION_MINOR;
extern const int g_iDB_VERSION_PATCH;

and change TSVN code that uses the macros to use
the const int variables.

This allows us to include the problematic header in
isolation and extract the needed information.

Thanks,

Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Aug 20 17:04:50 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.