Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
d8c4b193
Commit
d8c4b193
authored
Aug 24, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error with w64-mingw32 cross compiler. Add --enable-example option.
parent
a6817ff5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
configure.ac
configure.ac
+21
-1
lib/spdylay_gzip.c
lib/spdylay_gzip.c
+2
-0
lib/spdylay_net.h
lib/spdylay_net.h
+4
-0
lib/spdylay_session.c
lib/spdylay_session.c
+4
-4
No files found.
configure.ac
View file @
d8c4b193
...
...
@@ -45,6 +45,11 @@ AC_ARG_ENABLE([maintainer-mode],
[Turn on compile time warnings])],
[maintainer_mode=$withval], [maintainer_mode=no])
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples],
[Build example programs])],
[request_examples=$withval], [request_examples=yes])
dnl Checks for programs
AC_PROG_CC
AC_PROG_CXX
...
...
@@ -124,7 +129,12 @@ fi
AM_CONDITIONAL([HAVE_LIBXML2], [ test "x${have_libxml2}" = "xyes" ])
# The example programs depend on OpenSSL
enable_examples=$have_openssl
enable_examples=no
if test "x${request_examples}" = "xyes" &&
test "x${have_openssl}" = "xyes"; then
enable_examples=yes
fi
AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
# Checks for header files.
...
...
@@ -140,6 +150,9 @@ AC_CHECK_HEADERS([ \
unistd.h \
])
# For ntohl, ntohs in Windows
AC_CHECK_HEADERS([winsock2.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
...
...
@@ -188,6 +201,13 @@ if test "x$kevent_udata_intptr_t" = "xyes"; then
fi
AC_LANG_POP()
dnl Windows library for winsock2
case "${host}" in
*mingw*)
LIBS="$LIBS -lws2_32"
;;
esac
if test "x$maintainer_mode" != "xno"; then
CFLAGS="$CFLAGS -Wall -Wextra -Werror"
CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes"
...
...
lib/spdylay_gzip.c
View file @
d8c4b193
...
...
@@ -80,5 +80,7 @@ int spdylay_gzip_inflate(spdylay_gzip *inflater,
return
SPDYLAY_ERR_GZIP
;
default:
assert
(
0
);
/* We need this for some compilers */
return
0
;
}
}
lib/spdylay_net.h
View file @
d8c4b193
...
...
@@ -37,4 +37,8 @@
# include <netinet/in.h>
#endif
/* HAVE_NETINET_IN_H */
#ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
#endif
/* HAVE_WINSOCK2_H */
#endif
/* SPDYLAY_NET_H */
lib/spdylay_session.c
View file @
d8c4b193
...
...
@@ -2784,16 +2784,16 @@ ssize_t spdylay_session_pack_data(spdylay_session *session,
spdylay_data
*
frame
)
{
ssize_t
framelen
=
datamax
+
8
,
r
;
int
eof
;
int
eof
_flags
;
uint8_t
flags
;
r
=
spdylay_reserve_buffer
(
buf_ptr
,
buflen_ptr
,
framelen
);
if
(
r
!=
0
)
{
return
r
;
}
eof
=
0
;
eof
_flags
=
0
;
r
=
frame
->
data_prd
.
read_callback
(
session
,
frame
->
stream_id
,
(
*
buf_ptr
)
+
8
,
datamax
,
&
eof
,
&
frame
->
data_prd
.
source
,
session
->
user_data
);
&
eof
_flags
,
&
frame
->
data_prd
.
source
,
session
->
user_data
);
if
(
r
==
SPDYLAY_ERR_DEFERRED
||
r
==
SPDYLAY_ERR_TEMPORAL_CALLBACK_FAILURE
)
{
return
r
;
}
else
if
(
r
<
0
||
datamax
<
(
size_t
)
r
)
{
...
...
@@ -2804,7 +2804,7 @@ ssize_t spdylay_session_pack_data(spdylay_session *session,
spdylay_put_uint32be
(
&
(
*
buf_ptr
)[
0
],
frame
->
stream_id
);
spdylay_put_uint32be
(
&
(
*
buf_ptr
)[
4
],
r
);
flags
=
0
;
if
(
eof
)
{
if
(
eof
_flags
)
{
frame
->
eof
=
1
;
if
(
frame
->
flags
&
SPDYLAY_DATA_FLAG_FIN
)
{
flags
|=
SPDYLAY_DATA_FLAG_FIN
;
...
...
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