Changeset: 0318c1b64aaa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0318c1b64aaa
Modified Files:
        CMakeLists.txt
        gdk/gdk_posix.c
Branch: cmake-fun
Log Message:

psapi and ws2_32 libraries should be on the system path.


diffs (50 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -406,8 +406,8 @@ endif()
 set(DL_LIBRARIES "")
 set(KVM_LIBRARIES "")
 set(MATH_LIBRARIES "")
-set(SOCKET_LIBRARIES )
 set(PSAPI_LIBRARIES "")
+set(SOCKET_LIBRARIES "")
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        set(DL_LIBRARIES "${CMAKE_DL_LIBS}")
 endif()
@@ -418,21 +418,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "^Linux|
        set(MATH_LIBRARIES "m")
 endif()
 if(WIN32)
-       find_library(PSAPI_LIBRARY NAMES Psapi psapi DOC "psapi library to link 
on Windows")
-       if(NOT PSAPI_LIBRARY)
-               message(FATAL_ERROR "psapi library is required to compile 
MonetDB on Windows")
-       endif()
-       set(PSAPI_LIBRARIES "${PSAPI_LIBRARY}")
-
-       find_library(WSOCK32_LIBRARY NAMES Wsock32 wsock32 DOC "wsock32 library 
to link on Windows")
-       if(NOT WSOCK32_LIBRARY)
-               message(FATAL_ERROR "wsock32 library is missing and required to 
compile MonetDB on Windows")
-       endif()
-       find_library(WS2_32_LIBRARY NAMES Ws2_32 ws2_32 DOC "ws2_32 library to 
link on Windows")
-       if(NOT WS2_32_LIBRARY)
-               message(FATAL_ERROR "ws2_32 library is missing and required to 
compile MonetDB on Windows")
-       endif()
-       list(APPEND SOCKET_LIBRARIES ${WS2_32_LIBRARY} ${WSOCK32_LIBRARY})
+       set(PSAPI_LIBRARIES "psapi") # We need the psapi library for 
GetProcessMemoryInfo function, which is no longer required from Windows 7 and 
Windows Server 2008 R2 up
+       set(SOCKET_LIBRARIES "ws2_32")
 endif()
 include(FindExtraLibraries)
 
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -1051,8 +1051,7 @@ void
 MT_sleep_ms(unsigned int ms)
 {
        (void) nanosleep(&(struct timespec) {.tv_sec = ms / 1000,
-                               .tv_nsec = ms == 1 ? 1000 : (long) (ms % 1000) 
* 1000000,},
-               NULL);
+                                       .tv_nsec = ms == 1 ? 1000 : (long) (ms 
% 1000) * 1000000,}, NULL);
 }
 
 #else /* WIN32 */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to