Changeset: 9cb01229e2b8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9cb01229e2b8
Modified Files:
        clients/src/odbc/driver/ODBCGlobal.h
Branch: Oct2010
Log Message:

Make all definitions of PTRFMT the same.


diffs (26 lines):

diff -r 3d34c0219ae0 -r 9cb01229e2b8 clients/src/odbc/driver/ODBCGlobal.h
--- a/clients/src/odbc/driver/ODBCGlobal.h      Thu Sep 16 00:37:37 2010 +0200
+++ b/clients/src/odbc/driver/ODBCGlobal.h      Thu Sep 16 09:23:49 2010 +0200
@@ -122,6 +122,12 @@
 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901
 #define PTRFMT         "%p"
 #define PTRFMTCAST             /* no cast needed */
+#elif defined(_MSC_VER)
+/* On Windows, always use 64 bit integers (even on 32-bit architectures)
+ * to not get the warning C4311: 'type cast' : pointer truncation from
+ * 'void *' to 'unsigned int' */
+#define PTRFMT         "%I64x"
+#define PTRFMTCAST     (unsigned __int64)
 #elif SIZEOF_VOID_P == SIZEOF_INT
 #define PTRFMT         "%x"
 #define PTRFMTCAST     (unsigned int)
@@ -131,9 +137,6 @@
 #elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
 #define PTRFMT         "%llx"
 #define PTRFMTCAST     (unsigned long long)
-#elif SIZEOF_VOID_P == SIZEOF___INT64
-#define PTRFMT         "%I64x"
-#define PTRFMTCAST     (unsigned __int64)
 #else
 #error no definition for PTRFMT
 #endif
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to