Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
d8015fd6
Commit
d8015fd6
authored
Aug 29, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix libjasper build with MSVC
parent
6e6cfdd0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
CMakeLists.txt
3rdparty/libjasper/CMakeLists.txt
+2
-2
jas_malloc.c
3rdparty/libjasper/jas_malloc.c
+2
-0
jas_stream.c
3rdparty/libjasper/jas_stream.c
+12
-0
jas_stream.h
3rdparty/libjasper/jasper/jas_stream.h
+4
-0
No files found.
3rdparty/libjasper/CMakeLists.txt
View file @
d8015fd6
...
...
@@ -23,8 +23,8 @@ if(MSVC)
add_definitions
(
-DJAS_WIN_MSVC_BUILD
)
endif
()
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow -Wsign-compare
/wd4013 /wd4018 /wd4715 /wd4244 /wd4101 /wd4267
)
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow -Wsign-compare
)
ocv_warnings_disable
(
CMAKE_C_FLAGS /wd4013 /wd4018 /wd4101 /wd4244 /wd4267 /wd4715
)
# vs2005
if
(
UNIX
)
if
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
)
...
...
3rdparty/libjasper/jas_malloc.c
View file @
d8015fd6
...
...
@@ -78,7 +78,9 @@
#include <string.h>
#include <limits.h>
#include <errno.h>
#ifndef _WIN32
#include <stdint.h>
#endif
#include "jasper/jas_malloc.h"
...
...
3rdparty/libjasper/jas_stream.c
View file @
d8015fd6
...
...
@@ -363,6 +363,17 @@ jas_stream_t *jas_stream_tmpfile()
obj
->
flags
=
0
;
stream
->
obj_
=
obj
;
#ifdef _WIN32
/* Choose a file name. */
tmpnam
(
obj
->
pathname
);
/* Open the underlying file. */
if
((
obj
->
fd
=
open
(
obj
->
pathname
,
O_CREAT
|
O_EXCL
|
O_RDWR
|
O_TRUNC
|
O_BINARY
,
JAS_STREAM_PERMS
))
<
0
)
{
jas_stream_destroy
(
stream
);
return
0
;
}
#else
/* Choose a file name. */
snprintf
(
obj
->
pathname
,
L_tmpnam
,
"%s/tmp.XXXXXXXXXX"
,
P_tmpdir
);
...
...
@@ -371,6 +382,7 @@ jas_stream_t *jas_stream_tmpfile()
jas_stream_destroy
(
stream
);
return
0
;
}
#endif
/* Unlink the file so that it will disappear if the program
terminates abnormally. */
...
...
3rdparty/libjasper/jasper/jas_stream.h
View file @
d8015fd6
...
...
@@ -252,7 +252,11 @@ typedef struct {
typedef
struct
{
int
fd
;
int
flags
;
#if defined _WIN32 && !defined __MINGW__ && !defined __MINGW32__
char
pathname
[
MAX_PATH
+
1
];
#else
char
pathname
[
PATH_MAX
+
1
];
#endif
}
jas_stream_fileobj_t
;
#define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01
...
...
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