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
8d4548b9
Commit
8d4548b9
authored
Apr 04, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remoe-patch-1'
parents
0cd7d268
44f2e6ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/nghttp2_net.h
lib/nghttp2_net.h
+10
-4
No files found.
lib/nghttp2_net.h
View file @
8d4548b9
...
...
@@ -44,7 +44,13 @@
define inline functions for those function so that we don't have
dependeny on that lib. */
static
inline
uint32_t
htonl
(
uint32_t
hostlong
)
{
#ifdef _MSC_VER
#define STIN static __inline
#else
#define STIN static inline
#endif
STIN
uint32_t
htonl
(
uint32_t
hostlong
)
{
uint32_t
res
;
unsigned
char
*
p
=
(
unsigned
char
*
)
&
res
;
*
p
++
=
hostlong
>>
24
;
...
...
@@ -54,7 +60,7 @@ static inline uint32_t htonl(uint32_t hostlong) {
return
res
;
}
static
inline
uint16_t
htons
(
uint16_t
hostshort
)
{
STIN
uint16_t
htons
(
uint16_t
hostshort
)
{
uint16_t
res
;
unsigned
char
*
p
=
(
unsigned
char
*
)
&
res
;
*
p
++
=
hostshort
>>
8
;
...
...
@@ -62,7 +68,7 @@ static inline uint16_t htons(uint16_t hostshort) {
return
res
;
}
static
inline
uint32_t
ntohl
(
uint32_t
netlong
)
{
STIN
uint32_t
ntohl
(
uint32_t
netlong
)
{
uint32_t
res
;
unsigned
char
*
p
=
(
unsigned
char
*
)
&
netlong
;
res
=
*
p
++
<<
24
;
...
...
@@ -72,7 +78,7 @@ static inline uint32_t ntohl(uint32_t netlong) {
return
res
;
}
static
inline
uint16_t
ntohs
(
uint16_t
netshort
)
{
STIN
uint16_t
ntohs
(
uint16_t
netshort
)
{
uint16_t
res
;
unsigned
char
*
p
=
(
unsigned
char
*
)
&
netshort
;
res
=
*
p
++
<<
8
;
...
...
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