Changeset: 5b76eed5b823 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b76eed5b823
Modified Files:
        CMakeLists.txt
        common/stream/stream.c
        common/utils/mutils.c
        gdk/gdk_utils.c
        monetdb5/modules/kernel/alarm.c
        monetdb_config.h.in
        sql/backends/monet5/CMakeLists.txt
Branch: cmake-fun
Log Message:

Compilation fixes.


diffs (104 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -734,9 +734,11 @@ endif()
 if(WIN32)
        set(OS_DIRSEP  "\\\\")
        set(OS_PATHSEP ";")
+       set(SO_PREFIX  "lib")
 elseif(UNIX OR APPLE OR ${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN")
        set(OS_DIRSEP  "/")
        set(OS_PATHSEP ":")
+       set(SO_PREFIX  ${CMAKE_SHARED_LIBRARY_PREFIX})
 else()
        message(FATAL_ERROR "Unknown target operating system")
 endif()
@@ -746,7 +748,6 @@ set(DIR_SEP_STR  ${OS_DIRSEP})
 set(PATH_SEP     "'${OS_PATHSEP}'")
 set(PATH_SEP_STR ${OS_PATHSEP})
 set(SO_EXT       ${CMAKE_SHARED_LIBRARY_SUFFIX})
-set(SO_PREFIX    ${CMAKE_SHARED_LIBRARY_PREFIX})
 
 test_big_endian(WORDS_BIGENDIAN)
 if(APPLE)
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -179,6 +179,9 @@
                ((((uhge) 0xff << 120) & (uhge) (h)) >> 120)))
 #endif
 
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+#define isatty _isatty
+#endif
 
 struct stream {
        char *name;             /* name of the stream */
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -40,6 +40,15 @@
 # include <sys/sysctl.h>  /* KERN_PROC_PATHNAME on BSD */
 #endif
 
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+#define open _open
+#define close _close
+#endif
+
 #ifndef O_CLOEXEC
 #define O_CLOEXEC 0
 #endif
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -198,7 +198,7 @@ GDKlog(FILE *lockFile, const char *forma
        va_list ap;
        char *p = 0, buf[1024];
        time_t tm = time(0);
-#if defined(HAVE_CTIME_R3) || defined(HAVE_CTIME_R) || defined(HAVE_CTIME_S)
+#if defined(HAVE_CTIME_R3) || defined(HAVE_CTIME_R) || defined(HAVE_CTIME_S3)
        char tbuf[26];
 #endif
        char *ctm;
diff --git a/monetdb5/modules/kernel/alarm.c b/monetdb5/modules/kernel/alarm.c
--- a/monetdb5/modules/kernel/alarm.c
+++ b/monetdb5/modules/kernel/alarm.c
@@ -58,7 +58,7 @@ ALARMctime(str *res)
 {
        time_t t = time(0);
        char *base;
-#if defined(HAVE_CTIME_R3) || defined(HAVE_CTIME_R) || defined(HAVE_CTIME_S)
+#if defined(HAVE_CTIME_R3) || defined(HAVE_CTIME_R) || defined(HAVE_CTIME_S3)
        char buf[26];
 #endif
 
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -425,6 +425,9 @@
 /* Define if you have the SQLGetPrivateProfileString function */
 #cmakedefine HAVE_SQLGETPRIVATEPROFILESTRING
 
+/* Define if you have the `_stat64' function. */
+#cmakedefine HAVE_STAT64
+
 /* Define if you have the <stdatomic.h> header file */
 #cmakedefine HAVE_STDATOMIC_H
 
diff --git a/sql/backends/monet5/CMakeLists.txt 
b/sql/backends/monet5/CMakeLists.txt
--- a/sql/backends/monet5/CMakeLists.txt
+++ b/sql/backends/monet5/CMakeLists.txt
@@ -45,7 +45,7 @@ add_library(sql MODULE
                        sql_rank.c sql_rank.h)
 target_link_libraries(sql PRIVATE monetdb5 mapi gdk stream ${CRYPTO_LIBRARIES} 
PUBLIC sqlserver store batstore sqlcommon)
 set_target_properties(sql PROPERTIES RUNTIME_OUTPUT_NAME _sql 
LIBRARY_OUTPUT_NAME _sql)
-target_compile_definitions(sql PRIVATE LIBSQL)
+target_compile_definitions(sql PRIVATE LIBSQL LIBSQLSERVER LIBSQLCOMMON 
LIBBATSTORE LIBSTORE)
 
 install(TARGETS sql DESTINATION ${LIBDIR}/monetdb5)
 install(FILES
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to