linux_compact.h typedef unsigned long DWORD conflict with sqltypes.h

Jun 4, 2014 at 3:03 AM
Hi,
On Linux 64 bit, this type is 64 bit. Now I need to use the odbc interface (odbcUnix) in the same project with Casablanca and they also define DWORD (in sqltypes.h) but of type int. This creates a conflict and it stops the compilation with an error.

Do you know of a work around? Does Casablanca really need DWORD on Linux 64 to be 8 bit integer?

Thanks,
G.
Coordinator
Jun 6, 2014 at 3:29 AM
@gt227: I don't think Casablanca should define DWORD anywhere for Linux, because this is a Windows type. (I think we needed it at some point, but then cleaned things up and forgot to remove the typedef).

Can you try removing it from linux_compat.h (line 68) and report back? If it solves your problem, we'll remove it in the next release.

I suspect the same is true for the other two types in the same header -- ULONG and WORD.
Jun 6, 2014 at 5:55 PM
Hi,

I changed this:
typedef unsigned long ULONG;
typedef unsigned short WORD;
typedef unsigned long DWORD;
to this:
typedef unsigned long ULONG;
typedef unsigned short WORD;
///typedef unsigned long DWORD;
Everything seems to be ok. I was able to rebuild Casablanca and I run a quick test.

.....
I suspect the same is true for the other two types in the same header -- ULONG and WORD
.......
Maybe for ULONG but at first glance, WORD is used in the SYSTEMTIME class.

Thanks,

G.
Coordinator
Jun 6, 2014 at 6:49 PM
Thanks, I checked the fix into the development branch.
Marked as answer by arturl on 6/6/2014 at 11:49 AM