Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
524aa2e5
Commit
524aa2e5
authored
Jul 13, 2015
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #556 from nesteroff/vs2013
Fix VS2013 warnings
parents
4cb0c686
990a1b9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
mongoose.c
mongoose.c
+7
-2
No files found.
mongoose.c
View file @
524aa2e5
...
...
@@ -42,11 +42,16 @@
#undef UNICODE // Use ANSI WinAPI functions
#undef _UNICODE // Use multibyte encoding on Windows
#ifndef _MBCS
#define _MBCS // Use multibyte encoding on Windows
#endif
#define _INTEGRAL_MAX_BITS 64 // Enable _stati64() on Windows
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005+
#endif
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS // Disable deprecated Winsock API warnings in VS2013+
#endif
#undef WIN32_LEAN_AND_MEAN // Let windows.h always include winsock2.h
#ifdef __Linux__
#define _XOPEN_SOURCE 600 // For flockfile() on Linux
...
...
@@ -3887,7 +3892,7 @@ static void handle_put(struct connection *conn, const char *path) {
static
void
forward_put_data
(
struct
connection
*
conn
)
{
struct
iobuf
*
io
=
&
conn
->
ns_conn
->
recv_iobuf
;
size_t
k
=
conn
->
cl
<
(
int64_t
)
io
->
len
?
conn
->
cl
:
(
int64_t
)
io
->
len
;
// To write
size_t
k
=
(
size_t
)(
conn
->
cl
<
(
int64_t
)
io
->
len
?
conn
->
cl
:
(
int64_t
)
io
->
len
)
;
// To write
size_t
n
=
write
(
conn
->
endpoint
.
fd
,
io
->
buf
,
k
);
// Write them!
if
(
n
>
0
)
{
iobuf_remove
(
io
,
n
);
...
...
@@ -4796,7 +4801,7 @@ static void on_recv_data(struct connection *conn) {
}
if
(
conn
->
ns_conn
->
flags
&
NSF_DISCARD
)
{
size_t
n
=
conn
->
cl
;
size_t
n
=
(
size_t
)
conn
->
cl
;
if
(
n
>
io
->
len
)
{
n
=
io
->
len
;
}
...
...
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