Changeset: e7f30662ad4e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e7f30662ad4e
Modified Files:
CMakeLists.txt
clients/mapiclient/mclient.c
clients/mapiclient/mnc.c
clients/mapilib/CMakeLists.txt
common/stream/CMakeLists.txt
common/utils/mutils.c
common/utils/muuid.c
common/utils/prompt.c
gdk/gdk_posix.c
monetdb5/mal/mal_linker.c
monetdb_config.h.in
testing/Mtest.py.in
tools/merovingian/client/monetdb.c
Branch: cmake-fun
Log Message:
Removed old code for Solaris, AIX and KVM.
diffs (299 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1236,12 +1236,9 @@ check_include_file("mach/mach_init.h" HA
check_include_file("mach/task.h" HAVE_MACH_TASK_H)
check_include_file("mach-o/dyld.h" HAVE_MACH_O_DYLD_H)
check_include_file("netdb.h" HAVE_NETDB_H)
-check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
-check_include_file("procfs.h" HAVE_PROCFS_H)
check_include_file("pwd.h" HAVE_PWD_H)
check_include_file("stdatomic.h" HAVE_STDATOMIC_H)
check_include_file("strings.h" HAVE_STRINGS_H)
-check_include_file("stropts.h" HAVE_STROPTS_H)
check_include_file("sys/file.h" HAVE_SYS_FILE_H)
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
check_include_file("sys/mman.h" HAVE_SYS_MMAN_H)
@@ -1398,7 +1395,6 @@ check_symbol_exists("fseeko" "stdio.h" H
check_symbol_exists("fsync" "unistd.h" HAVE_FSYNC)
check_symbol_exists("ftime" "sys/timeb.h" HAVE_FTIME)
check_symbol_exists("GetDynamicTimeZoneInformation" "Windows.h"
HAVE_GETDYNAMICTIMEZONEINFORMATION)
-check_symbol_exists("getexecname" "stdlib.h" HAVE_GETEXECNAME)
check_symbol_exists("getlogin" "unistd.h" HAVE_GETLOGIN)
check_symbol_exists("getopt" "unistd.h" HAVE_GETOPT)
check_symbol_exists("getopt_long" "unistd.h;getopt.h" HAVE_GETOPT_LONG)
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -157,9 +157,6 @@ static char *nullstring = default_nullst
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h> /* gettimeofday */
#endif
-#ifdef HAVE_STROPTS_H
-#include <stropts.h> /* ioctl on Solaris */
-#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
diff --git a/clients/mapiclient/mnc.c b/clients/mapiclient/mnc.c
--- a/clients/mapiclient/mnc.c
+++ b/clients/mapiclient/mnc.c
@@ -35,9 +35,6 @@
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#ifndef HAVE_GETOPT_LONG
# include "monet_getopt.h"
diff --git a/clients/mapilib/CMakeLists.txt b/clients/mapilib/CMakeLists.txt
--- a/clients/mapilib/CMakeLists.txt
+++ b/clients/mapilib/CMakeLists.txt
@@ -24,9 +24,6 @@ install(FILES mapi.h DESTINATION ${INCLU
if(WIN32)
install(FILES $<TARGET_PDB_FILE:mapi> DESTINATION ${LIBDIR} OPTIONAL)
else()
- if(SOCKET_LIBRARIES)
- set(PKG_SOCKET_LIBS "-l${SOCKET_LIBRARIES}")
- endif()
configure_file(monetdb-mapi.pc.in
${CMAKE_CURRENT_BINARY_DIR}/monetdb-mapi.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/monetdb-mapi.pc DESTINATION
${PKGCONFIGDIR})
endif()
diff --git a/common/stream/CMakeLists.txt b/common/stream/CMakeLists.txt
--- a/common/stream/CMakeLists.txt
+++ b/common/stream/CMakeLists.txt
@@ -44,9 +44,6 @@ else()
if(SNAPPY_FOUND)
set(PKG_SNAPPY "-lsnappy")
endif()
- if(SOCKET_LIBRARIES)
- set(PKG_SOCKET_LIBS "-l${SOCKET_LIBRARIES}")
- endif()
if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN)
set(PKG_LIBICONV "-l${ICONV_LIBRARIES}")
endif()
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -480,22 +480,6 @@ get_bin_path(void)
mib[3] = -1;
if (sysctl(mib, 4, _bin_path, &cb, NULL, 0) == 0)
return _bin_path;
-#elif defined(HAVE_GETEXECNAME) /* Solaris */
- char buf[PATH_MAX];
- const char *execn = getexecname();
- /* getexecname doesn't always return an absolute path, the only
- * thing it seems to do is strip leading ./ from the invocation
- * string. */
- if (*execn != '/') {
- if (getcwd(buf, PATH_MAX) != NULL) {
- snprintf(buf + strlen(buf), PATH_MAX - strlen(buf),
"/%s", execn);
- if (realpath(buf, _bin_path) != NULL)
- return(_bin_path);
- }
- } else {
- if (realpath(execn, _bin_path) != NULL)
- return(_bin_path);
- }
#else /* try Linux approach, also works on Cygwin */
if (readlink("/proc/self/exe",
_bin_path, sizeof(_bin_path)) != -1)
diff --git a/common/utils/muuid.c b/common/utils/muuid.c
--- a/common/utils/muuid.c
+++ b/common/utils/muuid.c
@@ -34,12 +34,7 @@ char *
generateUUID(void)
{
#ifdef HAVE_UUID
-# ifdef UUID_PRINTABLE_STRING_LENGTH
- /* Solaris */
- char out[UUID_PRINTABLE_STRING_LENGTH];
-# else
char out[37];
-# endif
uuid_t uuid;
uuid_generate(uuid);
uuid_unparse(uuid, out);
diff --git a/common/utils/prompt.c b/common/utils/prompt.c
--- a/common/utils/prompt.c
+++ b/common/utils/prompt.c
@@ -32,15 +32,7 @@ char *
prompt_getlogin(void)
{
#ifdef HAVE_GETLOGIN
-# ifdef __sun__
- /* from Solaris' getlogin manpage:
- * The correct procedure for determining the login name is to call
- * cuserid(3C), or to call getlogin() and if it fails to call
- * getpwuid(3C). */
- return cuserid(NULL);
-# else
return getlogin();
-# endif
#else
return defaultlogin;
#endif
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -27,21 +27,12 @@
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
-#ifdef HAVE_PROCFS_H
-# include <procfs.h>
-#endif
#ifdef HAVE_MACH_TASK_H
# include <mach/task.h>
#endif
#ifdef HAVE_MACH_MACH_INIT_H
# include <mach/mach_init.h>
#endif
-#if defined(HAVE_KVM_H) && defined(HAVE_SYS_SYSCTL_H)
-# include <kvm.h>
-# include <sys/param.h>
-# include <sys/sysctl.h>
-# include <sys/user.h>
-#endif
#ifdef NDEBUG
#ifndef NVALGRIND
@@ -278,20 +269,7 @@ MT_init_posix(void)
size_t
MT_getrss(void)
{
-#if defined(HAVE_PROCFS_H) && defined(__sun__)
- /* retrieve RSS the Solaris way (2.6+) */
- int fd;
- psinfo_t psbuff;
-
- fd = open("/proc/self/psinfo", O_RDONLY | O_CLOEXEC);
- if (fd >= 0) {
- if (read(fd, &psbuff, sizeof(psbuff)) == sizeof(psbuff)) {
- close(fd);
- return psbuff.pr_rssize * 1024;
- }
- close(fd);
- }
-#elif defined(HAVE_TASK_INFO)
+#if defined(HAVE_TASK_INFO)
/* Darwin/MACH call for process' RSS */
task_t task = mach_task_self();
struct task_basic_info_64 t_info;
@@ -299,30 +277,6 @@ MT_getrss(void)
if (task_info(task, TASK_BASIC_INFO_64, (task_info_t)&t_info,
&t_info_count) != KERN_INVALID_POLICY)
return t_info.resident_size; /* bytes */
-#elif defined(HAVE_KVM_H) && defined(HAVE_SYS_SYSCTL_H)
- /* get RSS on FreeBSD and NetBSD */
- struct kinfo_proc *ki;
- int ski = 1;
- kvm_t *kd;
- size_t rss = 0;
-
- kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
- if (kd != NULL) {
- ki = kvm_getprocs(kd, KERN_PROC_PID, getpid(), &ski);
- if (ki != NULL) {
-#ifdef __NetBSD__ /* should we use configure for this? */
- /* see bug 3217 */
- rss = ki->kp_eproc.e_vm.vm_rssize;
-#else
- rss = ki->ki_rssize;
-#endif
- kvm_close(kd);
-
- return rss * MT_pagesize();
- } else {
- kvm_close(kd);
- }
- }
#elif defined(__linux__)
/* get RSS on Linux */
int fd;
diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c
--- a/monetdb5/mal/mal_linker.c
+++ b/monetdb5/mal/mal_linker.c
@@ -157,12 +157,6 @@ loadLibrary(str filename, int flag)
int idx;
const char *mod_path = GDKgetenv("monet_mod_path");
- /* AIX requires RTLD_MEMBER to load a module that is a member of an
- * archive. */
-#ifdef RTLD_MEMBER
- mode |= RTLD_MEMBER;
-#endif
-
for (idx = 0; idx < lastfile; idx++)
if (filesLoaded[idx].modname &&
strcmp(filesLoaded[idx].modname, filename) == 0)
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -218,9 +218,6 @@
/* Define to 1 if you have the `GetDynamicTimeZoneInformation' function. */
#cmakedefine HAVE_GETDYNAMICTIMEZONEINFORMATION 1
-/* Define to 1 if you have the `getexecname' function. */
-#cmakedefine HAVE_GETEXECNAME 1
-
/* Define to 1 if you have the `getlogin' function. */
#cmakedefine HAVE_GETLOGIN 1
@@ -329,9 +326,6 @@
/* Define to 1 if you have the <netdb.h> header file. */
#cmakedefine HAVE_NETDB_H 1
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#cmakedefine HAVE_NETINET_IN_H 1
-
/* Define to 1 if you have the `nl_langinfo' function. */
#cmakedefine HAVE_NL_LANGINFO 1
@@ -356,9 +350,6 @@
/* Define to 1 if you have the `posix_madvise' function. */
#cmakedefine HAVE_POSIX_MADVISE 1
-/* Define to 1 if you have the <procfs.h> header file. */
-#cmakedefine HAVE_PROCFS_H 1
-
/* Define to 1 if the proj library exists */
#cmakedefine HAVE_PROJ 1
@@ -446,9 +437,6 @@
/* Define to 1 if you have the `strncasecmp' function. */
#cmakedefine HAVE_STRNCASECMP 1
-/* Define to 1 if you have the <stropts.h> header file. */
-#cmakedefine HAVE_STROPTS_H 1
-
/* Define to 1 if you have the `strptime' function. */
#cmakedefine HAVE_STRPTIME 1
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3667,8 +3667,6 @@ if SYST == "Linux":
if not LINUX_DIST:
LINUX_DIST = SYST+':'+re.match('^([0-9\.]*)([^0-9\.].*)$',
RELEASE).group(1)
DIST,VERSION = LINUX_DIST.split(':', 1)
-elif SYST == "SunOS" and os.path.isfile('/etc/release'):
- (DIST,VERSION,rest) = open('/etc/release').readline().strip().split(' ',2)
else:
DIST = SYST
VERSION = RELEASE
diff --git a/tools/merovingian/client/monetdb.c
b/tools/merovingian/client/monetdb.c
--- a/tools/merovingian/client/monetdb.c
+++ b/tools/merovingian/client/monetdb.c
@@ -36,9 +36,6 @@
#ifdef HAVE_SYS_UN_H
#include <sys/un.h> /* sockaddr_un */
#endif
-#ifdef HAVE_STROPTS_H
-#include <stropts.h> /* ioctl on Solaris */
-#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list