git-svn-id: svn://db.shs.com.ru/pip@351 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-14 10:56:50 +00:00
parent 7f67db8c44
commit 861ce422c4
5 changed files with 11 additions and 48 deletions

View File

@@ -97,7 +97,6 @@
#ifdef WINDOWS #ifdef WINDOWS
# include <windef.h> # include <windef.h>
# include <winbase.h> # include <winbase.h>
# include <stdlib.h>
# include <malloc.h> # include <malloc.h>
# ifdef CC_VC # ifdef CC_VC
# define SHUT_RDWR 2 # define SHUT_RDWR 2

View File

@@ -24,56 +24,18 @@
#include "piflags.h" #include "piflags.h"
#include <iostream> #include <iostream>
#include <stdlib.h> //#include <stdlib.h>
#include <cassert> #include <cassert>
#include <string.h> //#include <string.h>
#include <string> //#include <string>
#ifndef QNX /*#ifndef QNX
# include <cstdio> # include <cstdio>
# include <cstdlib> # include <cstdlib>
#else #else
# include <stdio.h> # include <stdio.h>
#endif
/*#ifdef WINDOWS
# include <io.h>
# include <windows.h>
# include <wincon.h>
#endif*/
#ifdef CC_GCC
# include <unistd.h>
#endif
/*
#include <sys/types.h>
#include <cctype>
#include <ctime>
#include <csignal>
#include <cmath>
#include <typeinfo>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#ifdef WINDOWS
# include <conio.h>
# include <io.h>
# include <windows.h>
# include <wincon.h>
#else
# include <fcntl.h>
# include <sys/ioctl.h>
# include <pthread.h>
#endif
#ifdef MAC_OS
# include <mach/mach_traps.h>
# include <mach/mach.h>
# include <mach/clock.h>
# include <crt_externs.h>
#endif*/ #endif*/
extern PIMonitor piMonitor; extern PIMonitor piMonitor;
#ifndef QNX #ifndef QNX

View File

@@ -786,7 +786,6 @@ PIStringList PISerial::availableDevices(bool test) {
--i; --i;
continue; continue;
} }
int void_ = 0;
bool rok = true; bool rok = true;
#ifdef WINDOWS #ifdef WINDOWS
/*COMMTIMEOUTS times; /*COMMTIMEOUTS times;
@@ -799,6 +798,7 @@ PIStringList PISerial::availableDevices(bool test) {
if (ReadFile(hComm, &void_, 1, &readed_, 0) == 0) if (ReadFile(hComm, &void_, 1, &readed_, 0) == 0)
rok = GetLastError() == ;*/ rok = GetLastError() == ;*/
#else #else
int void_ = 0;
fcntl(fd, F_SETFL, O_NONBLOCK); fcntl(fd, F_SETFL, O_NONBLOCK);
if (::read(fd, &void_, 1) == -1) if (::read(fd, &void_, 1) == -1)
rok = errno != EIO; rok = errno != EIO;

View File

@@ -140,8 +140,8 @@ void PISystemMonitor::run() {
stat.physical_memsize = stat.resident_memsize - stat.share_memsize; stat.physical_memsize = stat.resident_memsize - stat.share_memsize;
#else #else
stat.ID = pID_; stat.ID = pID_;
HMODULE hMod; // HMODULE hMod;
DWORD cbNeeded; // DWORD cbNeeded;
if (GetProcessMemoryInfo(hProc, &mem_cnt, sizeof(mem_cnt)) != 0) { if (GetProcessMemoryInfo(hProc, &mem_cnt, sizeof(mem_cnt)) != 0) {
stat.physical_memsize = mem_cnt.WorkingSetSize; stat.physical_memsize = mem_cnt.WorkingSetSize;
} }

View File

@@ -27,7 +27,9 @@
#ifdef MAC_OS #ifdef MAC_OS
# include <pthread.h> # include <pthread.h>
#endif #endif
#ifdef CC_GCC
# include <unistd.h>
#endif
/*! \class PIThread /*! \class PIThread
* \brief Thread class * \brief Thread class