git-svn-id: svn://db.shs.com.ru/pip@140 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -136,6 +136,9 @@ endif ()
|
||||
|
||||
|
||||
# Add library
|
||||
if (${APPLE})
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||
endif (${APPLE})
|
||||
if (${WIN32})
|
||||
list(APPEND LIBS ws2_32 Iphlpapi Psapi)
|
||||
#execute_process(COMMAND "make_rc_win.bat" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_QUIET)
|
||||
@@ -153,7 +156,7 @@ if (${WIN32})
|
||||
#set(${CMAKE_CXX_FLAGS} "-O2")
|
||||
endif ()
|
||||
else ()
|
||||
set(${CMAKE_CXX_FLAGS} "-O2")
|
||||
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -O2")
|
||||
if (DEFINED ENV{QNX_HOST})
|
||||
list(APPEND LIBS socket dl)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
||||
|
||||
@@ -176,9 +176,9 @@
|
||||
#else
|
||||
|
||||
|
||||
#define __STR(x) #x
|
||||
#define __SSTR(x) __STR(x)
|
||||
#define LOCATION __FILE__ ":" __SSTR(__LINE__)
|
||||
#define _PI_STR(x) #x
|
||||
#define _PI_SSTR(x) _PI_STR(x)
|
||||
#define LOCATION __FILE__ ":" _PI_SSTR(__LINE__)
|
||||
|
||||
|
||||
#define PIOBJECT(name) \
|
||||
|
||||
@@ -94,7 +94,7 @@ void PIBaseTransfer::received(PIByteArray data) {
|
||||
}
|
||||
replies_cnt++;
|
||||
if (is_sending) {
|
||||
if (h.id >= 0 && h.id < replies.size())
|
||||
if (h.id < replies.size())
|
||||
replies[h.id] = pt;
|
||||
}
|
||||
if (is_receiving && h.id == 0) {
|
||||
|
||||
@@ -47,9 +47,15 @@
|
||||
# define _stat_call_ stat
|
||||
# define _stat_link_ lstat
|
||||
#else
|
||||
# if defined(MAC_OS)
|
||||
# define _fopen_call_ fopen
|
||||
# define _fseek_call_ fseek
|
||||
# define _ftell_call_ ftell
|
||||
# else
|
||||
# define _fopen_call_ fopen64
|
||||
# define _fseek_call_ fseeko64
|
||||
# define _ftell_call_ ftello64
|
||||
# endif
|
||||
# define _stat_struct_ struct stat64
|
||||
# define _stat_call_ stat64
|
||||
# define _stat_link_ lstat64
|
||||
|
||||
@@ -162,7 +162,7 @@ inline PIVector<double> abs(const PIVector<double> & v) {
|
||||
PIVector<double> result;
|
||||
result.resize(v.size());
|
||||
for (uint i = 0; i < v.size(); i++)
|
||||
result[i] = abs(v[i]);
|
||||
result[i] = fabs(v[i]);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user