Changeset: c18ea0bc0bdf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c18ea0bc0bdf
Modified Files:
        CMakeLists.txt
        clients/odbc/samples/arraytest.c
        clients/odbc/winsetup/setup.c
Branch: cmake-fun
Log Message:

More compilation fixes.


diffs (60 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1379,8 +1379,9 @@ if(NOT ${ENABLE_ODBC} STREQUAL "NO")
                        set(LENP_OR_POINTER_T "SQLPOINTER")
                endif()
 
-               check_include_file("odbcinst.h" HAVE_ODBCINST_H)
-               if(HAVE_ODBCINST_H)
+               find_path(ODBCINST_INCLUDE odbcinst.h)
+               if(ODBCINST_INCLUDE)
+                       set(HAVE_ODBCINST_H YES)
                        find_library(ODBCCP32_LIBRARY NAMES odbccp32)
                        if(ODBCCP32_LIBRARY)
                                set(ODBCINST_LIBRARIES 
"${ODBCINST_LIBRARIES};odbccp32")
@@ -1399,13 +1400,16 @@ if(NOT ${ENABLE_ODBC} STREQUAL "NO")
                                set(ODBC_LIBRARIES odbc32)
                        endif()
 
-                       if(NOT ${ODBCINST_LIBRARIES} STREQUAL "" AND NOT 
${ODBC_LIBRARIES} STREQUAL "")
+                       if(NOT "${ODBCINST_LIBRARIES}" STREQUAL "" AND NOT 
"${ODBC_LIBRARIES}" STREQUAL "")
                                set(HAVE_ODBC YES)
+                       elseif(${ENABLE_ODBC} STREQUAL "YES")
+                               message(FATAL_ERROR "ODBC libraries missing")
+                       else()
+                               message(STATUS "ODBC libraries missing")
                        endif()
                elseif(${ENABLE_ODBC} STREQUAL "YES")
                        message(FATAL_ERROR "odbcinst.h not found")
                else()
-                       set(HAVE_ODBC NO)
                        message(STATUS "odbcinst.h not found")
                endif()
        else()
diff --git a/clients/odbc/samples/arraytest.c b/clients/odbc/samples/arraytest.c
--- a/clients/odbc/samples/arraytest.c
+++ b/clients/odbc/samples/arraytest.c
@@ -8,7 +8,9 @@
 
 #ifdef _MSC_VER
 /* suppress deprecation warning for snprintf */
+#ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
+#endif
 
 #include <WTypes.h>
 #endif
diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c
--- a/clients/odbc/winsetup/setup.c
+++ b/clients/odbc/winsetup/setup.c
@@ -15,7 +15,9 @@
 #include <windows.h>
 /* indicate to sqltypes.h that windows.h has already been included and
    that it doesn't have to define Windows constants */
+#ifndef ALREADY_HAVE_WINDOWS_TYPE
 #define ALREADY_HAVE_WINDOWS_TYPE 1
+#endif
 #include <sql.h>
 #include <sqlext.h>
 #ifdef EXPORT
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to