From 8a1720c4d56525f24b84df2a634061a524e14256 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 6 Mar 2017 14:09:19 +0000 Subject: [PATCH] Bazaar Functions4U, SysInfo fixed to compile git-svn-id: svn://ultimatepp.org/upp/trunk@10904 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Functions4U/Functions4U.cpp | 1 + bazaar/Functions4U/Functions4U.h | 2 ++ bazaar/SysInfo/SysInfo.cpp | 5 ++++- bazaar/SysInfo/SysInfo.h | 1 - bazaar/SysInfo/SysInfo.upp | 6 +++--- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bazaar/Functions4U/Functions4U.cpp b/bazaar/Functions4U/Functions4U.cpp index 7f7784085..29aad10f1 100644 --- a/bazaar/Functions4U/Functions4U.cpp +++ b/bazaar/Functions4U/Functions4U.cpp @@ -101,6 +101,7 @@ bool LaunchFile(const char *file, const char *params, const char *directory) { return true; } #endif + #ifdef PLATFORM_POSIX String GetDesktopManagerNew() { diff --git a/bazaar/Functions4U/Functions4U.h b/bazaar/Functions4U/Functions4U.h index 476819724..75264cc2e 100644 --- a/bazaar/Functions4U/Functions4U.h +++ b/bazaar/Functions4U/Functions4U.h @@ -22,6 +22,8 @@ enum EXT_FILE_FLAGS {NO_FLAG = 0, //ASK_BEFORE_DELETE = 8 }; +String GetDesktopManagerNew(); + bool LaunchFile(const char *file, const char *params = 0, const char *directory = "."); bool FileCat(const char *file, const char *appendFile); diff --git a/bazaar/SysInfo/SysInfo.cpp b/bazaar/SysInfo/SysInfo.cpp index 3f95c3bdc..f08d10252 100644 --- a/bazaar/SysInfo/SysInfo.cpp +++ b/bazaar/SysInfo/SysInfo.cpp @@ -2212,8 +2212,11 @@ bool IsPortFree(int port) { bool ret = true; if(bind(socket_desc,(struct sockaddr *)&service , sizeof(service)) < 0) ret = false; - +#ifdef PLATFORM_WIN32 closesocket(socket_desc); +#else + close(socket_desc); +#endif #ifdef PLATFORM_WIN32 WSACleanup(); diff --git a/bazaar/SysInfo/SysInfo.h b/bazaar/SysInfo/SysInfo.h index 697706d3c..a6b7dd06f 100644 --- a/bazaar/SysInfo/SysInfo.h +++ b/bazaar/SysInfo/SysInfo.h @@ -101,7 +101,6 @@ bool ProcessExists(int64 pid); ///////////////////////////////////////////////////////////////////// // Os Info bool GetOsInfo(String &kernel, String &kerVersion, String &kerArchitecture, String &distro, String &distVersion, String &desktop, String &deskVersion); -String GetDesktopManagerNew(); ///////////////////////////////////////////////////////////////////// // Get drives info diff --git a/bazaar/SysInfo/SysInfo.upp b/bazaar/SysInfo/SysInfo.upp index aad212b78..28f47dbaa 100644 --- a/bazaar/SysInfo/SysInfo.upp +++ b/bazaar/SysInfo/SysInfo.upp @@ -15,10 +15,10 @@ library(POSIX) Xtst; options(MSC) "/D PSAPI_VERSION=1"; file - SysInfo.cpp, - SysInfo_in.h, SysInfo.h, - Os.cpp, + SysInfo_in.h, + SysInfo.cpp, + OS.cpp, srcdoc.tpp, ScreenGrab.cpp, MouseKey.cpp,