Changeset: 5d33871a5cd1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d33871a5cd1
Modified Files:
CMakeLists.txt
CMakeReadme.txt
clients/mapiclient/mclient.c
clients/mapiclient/prompt.c
clients/mapiclient/stethoscope.c
clients/mapiclient/tachograph.c
clients/mapiclient/tomograph.c
common/stream/stream.c
common/utils/msabaoth.c
common/utils/mutils.c
gdk/gdk.h
gdk/gdk_atoms.h
gdk/gdk_bbp.c
gdk/gdk_hash.c
gdk/gdk_heap.c
gdk/gdk_imprints.c
gdk/gdk_logger.c
gdk/gdk_orderidx.c
gdk/gdk_storage.c
monetdb5/mal/mal_linker.c
monetdb5/mal/mal_sabaoth.c
monetdb_config.h.in
tools/mserver/mserver5.c
Branch: cmake-fun
Log Message:
Cleanup include header files for MSVC compilation.
I hope it still compiles.
diffs (truncated from 681 to 300 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -560,7 +560,7 @@ endif()
if("${ENABLE_TESTING}" STREQUAL "YES" AND NOT HAVE_PYTHON3)
message(FATAL_ERROR "A valid Python 3 interpreter is required for
MonetDB testing tools")
endif()
-if("${ENABLE_TESTING}" STREQUAL "YES" AND HAVE_PYTHON3)
+if("${ENABLE_TESTING}" MATCHES "^YES|AUTO$" AND HAVE_PYTHON3)
set(HAVE_TESTING ON CACHE INTERNAL "Test suite is enabled" FORCE)
else()
set(HAVE_TESTING OFF CACHE INTERNAL "Test suite is enabled" FORCE)
diff --git a/CMakeReadme.txt b/CMakeReadme.txt
--- a/CMakeReadme.txt
+++ b/CMakeReadme.txt
@@ -45,8 +45,11 @@ ENABLE_ODBC
ENABLE_PY3INTEGRATION
ENABLE_RINTEGRATION
ENABLE_SAMTOOLS
+ENABLE_SANITIZER
ENABLE_SHP
ENABLE_SQL
+ENABLE_STATIC_ANALYSIS
+ENABLE_STRICT
ENABLE_TESTING
- GNU installation directories (only on UNIX platforms)
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -15,37 +15,32 @@
#include "monetdb_config.h"
#include "mapi.h"
-#ifdef NATIVE_WIN32
-#include "monet_getopt.h"
-#include <io.h>
-#else
-#include "getopt.h"
-#include <unistd.h>
-#include <strings.h> /* strcasecmp */
-#endif
+#include "stream.h"
+#include "msqldump.h"
+#include "mprompt.h"
+#include "mutils.h"
+#include "dotmonetdb.h"
#include <sys/stat.h>
#ifdef HAVE_LIBREADLINE
#include <readline/readline.h>
#include <readline/history.h>
#include "ReadlineTools.h"
#endif
-#include "stream.h"
-#include "msqldump.h"
-#include "mprompt.h"
-#include "mutils.h" /* mercurial_revision */
-#include "dotmonetdb.h"
-
#include <locale.h>
-
#ifdef HAVE_ICONV
#include <iconv.h>
#ifndef NATIVE_WIN32
#include <langinfo.h>
#endif
#endif
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef NATIVE_WIN32
+#include "monet_getopt.h"
+#include <io.h>
#define isatty _isatty
+#else
+#include "getopt.h"
+#include <unistd.h>
+#include <strings.h> /* strcasecmp */
#endif
enum modes {
@@ -139,16 +134,13 @@ static char *nullstring = default_nullst
#include <time.h>
#ifdef NATIVE_WIN32
#include <sys/timeb.h> /* ftime */
+#define fileno _fileno
#else
#include <sys/time.h> /* gettimeofday */
#include <sys/ioctl.h>
#include <termios.h> /* TIOCGWINSZ/TIOCSWINSZ */
#endif
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#define fileno _fileno
-#endif
-
#define my_isspace(c) ((c) == '\f' || (c) == '\n' || (c) == ' ')
#include <ctype.h>
diff --git a/clients/mapiclient/prompt.c b/clients/mapiclient/prompt.c
--- a/clients/mapiclient/prompt.c
+++ b/clients/mapiclient/prompt.c
@@ -7,16 +7,14 @@
*/
#include "monetdb_config.h"
-#ifndef NATIVE_WIN32
+#include "mprompt.h"
+#ifdef NATIVE_WIN32
+#define fileno _fileno
+#include <conio.h>
+#else
#include <termios.h>
#include <unistd.h>
#endif
-#include "mprompt.h"
-
-#ifdef _MSC_VER
-#define fileno _fileno
-#include <conio.h>
-#endif
char *
prompt_getlogin(void)
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -20,36 +20,30 @@
#include "stream.h"
#include "stream_socket.h"
#include "mapi.h"
-#include <sys/stat.h>
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
#include "mprompt.h"
#include "dotmonetdb.h"
#include "eventparser.h"
+#include <sys/stat.h>
+#include <signal.h>
#ifdef NATIVE_WIN32
# include "monet_getopt.h"
# include <io.h>
+# define open _open
+# define close _close
+# define read _read
+# define write _write
#else
# include "getopt.h"
# include <netdb.h>
# include <netinet/in.h>
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#define open _open
-#define close _close
-#define read _read
-#define write _write
+# include <unistd.h>
#endif
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
#endif
-
#define die(dbh, hdl) \
do { \
if (hdl) \
diff --git a/clients/mapiclient/tachograph.c b/clients/mapiclient/tachograph.c
--- a/clients/mapiclient/tachograph.c
+++ b/clients/mapiclient/tachograph.c
@@ -16,28 +16,26 @@
#include "stream.h"
#include "stream_socket.h"
#include "mapi.h"
+#include "mprompt.h"
+#include "dotmonetdb.h"
+#include "eventparser.h"
#include <sys/stat.h>
#include <signal.h>
+#include <math.h>
+
#ifdef NATIVE_WIN32
# include "monet_getopt.h"
# include <io.h>
+# define open _open
+# define close _close
+# define read _read
+# define write _write
#else
# include "getopt.h"
# include <unistd.h>
# include <netdb.h>
# include <netinet/in.h>
#endif
-#include <math.h>
-#include "mprompt.h"
-#include "dotmonetdb.h"
-#include "eventparser.h"
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#define open _open
-#define close _close
-#define read _read
-#define write _write
-#endif
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -20,27 +20,24 @@
#include "stream.h"
#include "stream_socket.h"
#include "mapi.h"
+#include "mprompt.h"
+#include "dotmonetdb.h"
+#include "eventparser.h"
#include <sys/stat.h>
#include <signal.h>
+#include <time.h>
+
#ifdef NATIVE_WIN32
#include "monet_getopt.h"
#include <direct.h>
#include <io.h>
-#else
-#include "getopt.h"
-#include <unistd.h>
-#endif
-#include "mprompt.h"
-#include "dotmonetdb.h"
-#include "eventparser.h"
-
-#include <time.h>
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
#define open _open
#define close _close
#define read _read
#define write _write
+#else
+#include "getopt.h"
+#include <unistd.h>
#endif
#define die(dbh, hdl) \
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -48,7 +48,6 @@
* write streams of the same type (txt/bin).
*/
-
#include "monetdb_config.h"
#include "stream.h"
#include "stream_socket.h"
@@ -57,17 +56,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#ifdef NATIVE_WIN32
-# include <ws2tcpip.h>
-# include <io.h>
-#else
-# include <unistd.h>
-# include <netinet/in_systm.h>
-# include <netinet/in.h>
-# include <netinet/ip.h>
-# include <netinet/tcp.h>
-# include <netdb.h>
-#endif
#ifdef HAVE_LIBZ
#include <zlib.h>
#endif
@@ -92,6 +80,21 @@
#endif
#endif
+#ifdef NATIVE_WIN32
+# include <ws2tcpip.h>
+# include <io.h>
+# define pclose _pclose
+# define isatty _isatty
+# define fileno _fileno
+#else
+# include <unistd.h>
+# include <netinet/in_systm.h>
+# include <netinet/in.h>
+# include <netinet/ip.h>
+# include <netinet/tcp.h>
+# include <netdb.h>
+#endif
+
#ifndef SHUT_RD
#define SHUT_RD 0
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list