Changeset: 3e5f672d3adc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e5f672d3adc
Modified Files:
        CMakeLists.txt
        clients/mapiclient/ReadlineTools.c
        clients/mapiclient/dump.c
        clients/mapiclient/eventparser.h
        clients/mapiclient/mclient.c
        clients/mapiclient/mhelp.c
        clients/mapiclient/msqldump.c
        clients/mapiclient/prompt.c
        clients/mapiclient/stethoscope.c
        clients/mapiclient/tachograph.c
        clients/mapiclient/tomograph.c
        clients/mapilib/mapi.c
        clients/odbc/driver/ODBCConvert.c
        clients/odbc/driver/SQLBrowseConnect.c
        clients/odbc/driver/SQLDriverConnect.c
        common/options/monet_options.c
        common/stream/stream.c
        common/stream/stream.h
        common/stream/stream_socket.h
        common/utils/msabaoth.c
        common/utils/mutils.c
        gdk/gdk.h
        gdk/gdk_hash.c
        gdk/gdk_heap.c
        gdk/gdk_imprints.c
        gdk/gdk_orderidx.c
        gdk/gdk_posix.c
        gdk/gdk_posix.h
        gdk/gdk_storage.c
        gdk/gdk_system.c
        gdk/gdk_system.h
        gdk/gdk_utils.c
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_linker.c
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_profiler.h
        monetdb5/mal/mal_sabaoth.c
        monetdb5/modules/kernel/status.c
        monetdb5/modules/mal/mal_mapi.c
        monetdb5/modules/mal/mdb.h
        monetdb5/modules/mal/remote.h
        monetdb5/scheduler/run_pipeline.h
        monetdb_config.h.in
        sql/backends/monet5/UDF/pyapi/undef.h
        sql/backends/monet5/sql_execute.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_upgrades.c
        sql/server/rel_semantic.c
        sql/server/sql_parser.y
        sql/server/sql_scan.c
        sql/server/sql_semantic.c
        testing/Mdiff.c
        testing/difflib.c
        tools/merovingian/client/monetdb.c
        tools/merovingian/daemon/client.c
        tools/merovingian/daemon/merovingian.c
        tools/merovingian/daemon/proxy.c
        tools/merovingian/utils/control.c
Branch: cmake-fun
Log Message:

Attempt to remove unnecessary checks for header files existent only on UNIX 
systems.


diffs (truncated from 1609 to 300 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,6 @@ set(CMAKE_FIND_APPBUNDLE LAST)
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" CACHE INTERNAL "Location of 
custom CMake modules.")
 include(CheckCSourceCompiles REQUIRED)
 include(CheckIncludeFile REQUIRED)
-include(CheckIncludeFiles REQUIRED)
 include(CMakePushCheckState REQUIRED)
 include(CheckStructHasMember REQUIRED)
 include(CheckSymbolExists REQUIRED)
@@ -414,28 +413,13 @@ endif()
 include(FindExtraLibraries)
 
 # Header files
-check_include_file("dirent.h" HAVE_DIRENT_H)
-check_include_file("fcntl.h" HAVE_FCNTL_H)
-check_include_file("getopt.h" HAVE_GETOPT_H)
-check_include_file("io.h" HAVE_IO_H)
-check_include_file("kvm.h" HAVE_KVM_H)
+check_include_file("getopt.h" HAVE_GETOPT_H) # GNU extension
+check_include_file("kvm.h" HAVE_KVM_H) # For FreeBSD
 check_include_file("libintl.h" HAVE_LIBINTL_H)
-check_include_file("netdb.h" HAVE_NETDB_H)
 check_include_file("pthread.h" HAVE_PTHREAD_H)
 check_include_file("stdatomic.h" HAVE_STDATOMIC_H) # C11 include file
-check_include_file("strings.h" HAVE_STRINGS_H)
-check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
 check_include_file("sys/mman.h" HAVE_SYS_MMAN_H) # For madvise and 
posix_madvise on BSD systems
-check_include_file("sys/param.h" HAVE_SYS_PARAM_H)
-check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H)
-check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H)
-check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
-check_include_files("sys/param.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H) # on 
OpenBSD, sys/sysctl.h requires sys/param.h to be included beforehand
 check_include_file("sys/time.h" HAVE_SYS_TIME_H)
-check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
-check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
-check_include_file("sys/un.h" HAVE_SYS_UN_H)
-check_include_file("unistd.h" HAVE_UNISTD_H)
 
 # C types existence
 cmake_push_check_state()
diff --git a/clients/mapiclient/ReadlineTools.c 
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -17,7 +17,7 @@
 #include <readline/history.h>
 #include "ReadlineTools.h"
 
-#ifdef HAVE_STRINGS_H
+#ifndef NATIVE_WIN32
 #include <strings.h>           /* for strncasecmp */
 #endif
 
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -9,7 +9,7 @@
 #include "monetdb_config.h"
 #include "mapi.h"
 #include "stream.h"
-#ifdef HAVE_UNISTD_H
+#ifndef NATIVE_WIN32
 #include <unistd.h>
 #endif
 #include <string.h>
diff --git a/clients/mapiclient/eventparser.h b/clients/mapiclient/eventparser.h
--- a/clients/mapiclient/eventparser.h
+++ b/clients/mapiclient/eventparser.h
@@ -23,11 +23,9 @@
 #include "mapi.h"
 #include "stream.h"
 #include <string.h>
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 #include <signal.h>
-#ifdef HAVE_UNISTD_H
+#ifndef NATIVE_WIN32
 #include <unistd.h>
 #endif
 #include <time.h>
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -22,14 +22,13 @@
 # endif
 #endif
 #include "mapi.h"
-#ifdef HAVE_UNISTD_H
+#include <string.h>
+#ifdef NATIVE_WIN32
+# include <io.h>
+#else
 #include <unistd.h>
-#endif
-#include <string.h>
-#ifdef HAVE_STRINGS_H
 #include <strings.h>           /* strcasecmp */
 #endif
-
 #ifdef HAVE_LIBREADLINE
 #include <readline/readline.h>
 #include <readline/history.h>
@@ -50,10 +49,6 @@
 #endif
 #endif
 
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif
-
 #if defined(_MSC_VER) && _MSC_VER >= 1400
 #define isatty _isatty
 #endif
@@ -153,10 +148,8 @@ static char *nullstring = default_nullst
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>          /* gettimeofday */
 #endif
-#ifdef HAVE_SYS_IOCTL_H
+#ifndef NATIVE_WIN32
 #include <sys/ioctl.h>
-#endif
-#ifndef NATIVE_WIN32
 #include <termios.h>           /* TIOCGWINSZ/TIOCSWINSZ */
 #endif
 
@@ -3193,7 +3186,7 @@ usage(const char *prog, int xit)
 {
        fprintf(stderr, "Usage: %s [ options ] [ file or database [ file ... ] 
]\n", prog);
        fprintf(stderr, "\nOptions are:\n");
-#ifdef HAVE_SYS_UN_H
+#ifndef NATIVE_WIN32
        fprintf(stderr, " -h hostname | --host=hostname    host or UNIX domain 
socket to connect to\n");
 #else
        fprintf(stderr, " -h hostname | --host=hostname    host to connect 
to\n");
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -27,7 +27,7 @@
 #include "monetdb_config.h"
 #include <ctype.h>
 #include <string.h>
-#ifdef HAVE_STRINGS_H
+#ifndef NATIVE_WIN32
 #include <strings.h>           /* for strncasecmp */
 #endif
 #include "stream.h"
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -15,12 +15,10 @@
 # endif
 #endif
 #include "mapi.h"
-#ifdef HAVE_UNISTD_H
+#ifndef NATIVE_WIN32
 # include <unistd.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <string.h>
 #include <time.h>
 
diff --git a/clients/mapiclient/prompt.c b/clients/mapiclient/prompt.c
--- a/clients/mapiclient/prompt.c
+++ b/clients/mapiclient/prompt.c
@@ -7,12 +7,10 @@
  */
 
 #include "monetdb_config.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #include <string.h>
 #ifndef NATIVE_WIN32
 #include <termios.h>
+#include <unistd.h>
 #endif
 #include "mprompt.h"
 
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -21,9 +21,7 @@
 #include "stream_socket.h"
 #include "mapi.h"
 #include <string.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <signal.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -40,15 +38,13 @@
 # endif
 #endif
 
-#ifdef HAVE_NETDB_H
+#ifdef NATIVE_WIN32
+# include <io.h>
+#else
 # include <netdb.h>
 # include <netinet/in.h>
 #endif
 
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif
-
 #if defined(_MSC_VER) && _MSC_VER >= 1400
 #define open  _open
 #define close _close
diff --git a/clients/mapiclient/tachograph.c b/clients/mapiclient/tachograph.c
--- a/clients/mapiclient/tachograph.c
+++ b/clients/mapiclient/tachograph.c
@@ -17,12 +17,14 @@
 #include "stream_socket.h"
 #include "mapi.h"
 #include <string.h>
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 #include <signal.h>
-#ifdef HAVE_UNISTD_H
+#ifdef NATIVE_WIN32
+# include <io.h>
+#else
 # include <unistd.h>
+# include <netdb.h>
+# include <netinet/in.h>
 #endif
 #include <math.h>
 #include "mprompt.h"
@@ -37,15 +39,6 @@
 # endif
 #endif
 
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-# include <netinet/in.h>
-#endif
-
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif
-
 #if defined(_MSC_VER) && _MSC_VER >= 1400
 #define open  _open
 #define close _close
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -21,11 +21,12 @@
 #include "stream_socket.h"
 #include "mapi.h"
 #include <string.h>
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 #include <signal.h>
-#ifdef HAVE_UNISTD_H
+#ifdef NATIVE_WIN32
+#include <direct.h>
+#include <io.h>
+#else
 #include <unistd.h>
 #endif
 #include "mprompt.h"
@@ -42,10 +43,6 @@
 
 #include <time.h>
 
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif
-
 #if defined(_MSC_VER) && _MSC_VER >= 1400
 #define open  _open
 #define close _close
@@ -53,9 +50,7 @@
 #define write _write
 #endif
 
-#ifdef NATIVE_WIN32
-#include <direct.h>
-#endif
+
 
 #define die(dbh, hdl)                                          \
        do {                                                    \
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -690,31 +690,20 @@
 #include "mcrypt.h"
 #include "matomic.h"
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to