-
-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alpha version of Linux #282
Changes from all commits
e81b8eb
e89814e
d1744ab
298826c
6877b51
98fecf6
4bc9e7c
cb3bf78
ede7eec
e85b6fa
2801582
289be4f
1d5549e
992d806
19d13e4
b1df2ce
be4272d
e3d5edd
44584f8
24bdb79
a3d0d9c
1c7dea1
d090b44
22f5942
56ef5d9
204029a
1b791e3
82e947e
e1d67d0
ecca848
9e0db4b
3f84af5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ if (WIN32) | |
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB") | ||
set(_TBB_LIB_NAME "tbb") | ||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc") | ||
set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
# set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe remove this garbage instead of commenting it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure that I will not be required to return it. |
||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug") | ||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug") | ||
if (MSVC71) | ||
|
@@ -79,7 +79,7 @@ if (UNIX) | |
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug | ||
set(_TBB_LIB_NAME "tbb") | ||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc") | ||
set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
# set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug") | ||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug") | ||
# has only one flavor: ia32/cc4.0.1_os10.4.9 | ||
|
@@ -90,7 +90,7 @@ if (UNIX) | |
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include") | ||
set(_TBB_LIB_NAME "tbb") | ||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc") | ||
set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
# set(_TBB_LIB_MALLOC_PROXY_NAME "${_TBB_LIB_NAME}malloc_proxy") | ||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug") | ||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug") | ||
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21 | ||
|
@@ -146,7 +146,7 @@ endif (NOT _TBB_INSTALL_DIR) | |
if (TBB_OBVIOUS_PLACE) | ||
set (TBB_FOUND "YES") | ||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME}) | ||
find_library(TBB_MALLOC_PROXY_LIBRARY ${_TBB_LIB_MALLOC_PROXY_NAME} ${TBB_LIBRARY_DIR}) | ||
# find_library(TBB_MALLOC_PROXY_LIBRARY ${_TBB_LIB_MALLOC_PROXY_NAME} ${TBB_LIBRARY_DIR}) | ||
set (TBB_LIBRARIES ${TEST_TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_MALLOC_PROXY_LIBRARY} ${TBB_LIBRARIES}) | ||
set (TBB_INCLUDE_DIRS ${TEST_TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE) | ||
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES) | ||
|
@@ -181,7 +181,7 @@ else (TBB_OBVIOUS_PLACE) | |
|
||
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
find_library(TBB_MALLOC_PROXY_LIBRARY ${_TBB_LIB_MALLOC_PROXY_NAME} ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
# find_library(TBB_MALLOC_PROXY_LIBRARY ${_TBB_LIB_MALLOC_PROXY_NAME} ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
|
||
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY TBB_MALLOC_PROXY_LIBRARY) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,7 +85,7 @@ inline void _splitpath(const char* path, // Path Input | |
) | ||
{ | ||
if(!path) | ||
return EINVAL; | ||
return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the NULL in path is expected behaviour? Seems like not - we don't report the error to the caller. So... Let's insert some type of assertion here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This case is defined in MSDN in the following way:
We're trying to reproduce that second case. Notice that it doesn't make sense, because _splitpath is supposed to return There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, reporting an error is an alternative solution. If this function tries to mimic the Windows implementation - I agree that it's the preferrable way. |
||
|
||
const char *p, *end; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's init the variables directly in this line |
||
|
||
|
@@ -403,6 +403,11 @@ inline int strncat_s(char * dest, size_t num, const char * source, size_t count) | |
} | ||
|
||
#define _vsnprintf vsnprintf | ||
inline int vsnprintf_s(char* buffer, size_t size, size_t, const char* format, va_list list) | ||
{ | ||
//TODO add bound check | ||
return vsnprintf(buffer, size, format, list); | ||
} | ||
#define vsprintf_s(dest, size, format, args) vsprintf(dest, format, args) | ||
#define _alloca alloca | ||
#define _snprintf snprintf | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the magic number "3"? Can we use the expression like sizeof(array)/sizeof(array[0]) here? Or maybe define some constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not array, type of pos is a pointer to dReal, but it a pointer to the first component of the vector is passed to the function. Even if we pass the link to the Fvector itself there, we cannot calculate the size of the components, we need to know in advance how much to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sucks :( This 'style' should lead to a lot of typos. I believe we find a LOT of such bugs later.