Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
f36e5f92
Commit
f36e5f92
authored
Jan 20, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #960 from alalek:issue_contrib_955
parents
44071d78
695996e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
CMakeLists.txt
modules/dnn/CMakeLists.txt
+5
-5
THDiskFile.cpp
modules/dnn/src/torch/THDiskFile.cpp
+2
-2
No files found.
modules/dnn/CMakeLists.txt
View file @
f36e5f92
cmake_minimum_required
(
VERSION 2.8
)
if
(
APPLE_FRAMEWORK OR WINRT
OR AARCH64
# protobuf doesn't know this platform
)
if
(
WINRT
)
ocv_module_disable
(
dnn
)
endif
()
...
...
@@ -29,6 +25,10 @@ else()
)
endif
()
if
(
APPLE_FRAMEWORK
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wshorten-64-to-32
)
endif
()
if
(
ANDROID
)
add_definitions
(
-DDISABLE_POSIX_MEMALIGN -DTH_DISABLE_HEAP_TRACKING
)
endif
()
...
...
modules/dnn/src/torch/THDiskFile.cpp
View file @
f36e5f92
...
...
@@ -30,11 +30,11 @@ const char *THDiskFile_name(THFile *self)
/* workaround mac osx lion ***insane*** fread bug */
#ifdef __APPLE__
size_t
fread__
(
void
*
ptr
,
size_t
size
,
size_t
nitems
,
FILE
*
stream
)
s
tatic
s
ize_t
fread__
(
void
*
ptr
,
size_t
size
,
size_t
nitems
,
FILE
*
stream
)
{
size_t
nread
=
0
;
while
(
!
feof
(
stream
)
&&
!
ferror
(
stream
)
&&
(
nread
<
nitems
))
nread
+=
fread
((
char
*
)
ptr
+
nread
*
size
,
size
,
THMin
(
2147483648
/
size
,
nitems
-
nread
),
stream
);
nread
+=
fread
((
char
*
)
ptr
+
nread
*
size
,
size
,
THMin
(
2147483648
UL
/
size
,
nitems
-
nread
),
stream
);
return
nread
;
}
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment