$OpenBSD: patch-include_sqltypes_h,v 1.2 2007/12/11 00:34:30 simon Exp $
--- include/sqltypes.h.orig	Thu Jan 26 10:50:59 2006
+++ include/sqltypes.h	Sun Dec  9 22:39:03 2007
@@ -337,7 +337,7 @@ SQL_INTERVAL_STRUCT;
  */
 #if (ODBCVER >= 0x0300)
 
-#if (_MSC_VER >= 900)
+#if defined(_MSC_VER) && (_MSC_VER >= 900)
 #  define ODBCINT64 		__int64
 #endif
 
@@ -396,7 +396,7 @@ typedef unsigned short SQLWCHAR;
 
 #  if defined(__cplusplus)		|| \
       defined(_WCHAR_T)			|| \
-      defined(_WCHAR_T_DEFINED)		|| \
+      defined(_WCHAR_T_DEFINED_)	|| \
       defined(_WCHAR_T_DECLARED)        || \
       defined(_BSD_WCHAR_T_DEFINED_)    || \
       defined(_BSD_WCHAR_T_)
