Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
99684bc4
Commit
99684bc4
authored
Aug 17, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Allow programs to take the address of byte-swapping functions.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79ebd3f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
winsock.h
include/winsock.h
+16
-8
No files found.
include/winsock.h
View file @
99684bc4
...
...
@@ -519,10 +519,18 @@ int WINAPI __WSAFDIsSet(SOCKET,WS(fd_set)*);
#ifdef WORDS_BIGENDIAN
#define htonl(l) ((ULONG)(l))
#define htons(s) ((u_short)(s))
#define ntohl(l) ((ULONG)(l))
#define ntohs(s) ((u_short)(s))
static
inline
u_short
__wine_ushort_noop
(
u_short
s
)
{
return
s
;
}
static
inline
ULONG
__wine_ulong_noop
(
ULONG
l
)
{
return
l
;
}
#define htonl __wine_ulong_noop
#define htons __wine_ushort_noop
#define ntohl __wine_ulong_noop
#define ntohs __wine_ushort_noop
#else
/* WORDS_BIGENDIAN */
...
...
@@ -534,10 +542,10 @@ static inline ULONG __wine_ulong_swap(ULONG l)
{
return
((
ULONG
)
__wine_ushort_swap
((
u_short
)
l
)
<<
16
)
|
__wine_ushort_swap
((
u_short
)(
l
>>
16
));
}
#define htonl
(l) __wine_ulong_swap(l)
#define htons
(s) __wine_ushort_swap(s)
#define ntohl
(l) __wine_ulong_swap(l)
#define ntohs
(s) __wine_ushort_swap(s)
#define htonl
__wine_ulong_swap
#define htons
__wine_ushort_swap
#define ntohl
__wine_ulong_swap
#define ntohs
__wine_ushort_swap
#endif
/* WORDS_BIGENDIAN */
...
...
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