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
a14d34b2
Commit
a14d34b2
authored
Oct 01, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix compilation with MinGW/MSVC.
parent
d82e36fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
net.c
dlls/winhttp/net.c
+6
-4
winhttp_private.h
dlls/winhttp/winhttp_private.h
+6
-0
No files found.
dlls/winhttp/net.c
View file @
a14d34b2
...
...
@@ -50,12 +50,12 @@
#include "winhttp.h"
#include "wincrypt.h"
#include "winhttp_private.h"
/* to avoid conflicts with the Unix socket headers */
#define USE_WS_PREFIX
#include "winsock2.h"
#include "winhttp_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
winhttp
);
#define DEFAULT_SEND_TIMEOUT 30
...
...
@@ -115,6 +115,7 @@ MAKE_FUNCPTR( ERR_error_string );
/* translate a unix error code into a winsock error code */
static
int
sock_get_error
(
int
err
)
{
#if !defined(__MINGW32__) && !defined (_MSC_VER)
switch
(
err
)
{
case
EINTR
:
return
WSAEINTR
;
...
...
@@ -174,6 +175,7 @@ static int sock_get_error( int err )
#endif
default:
errno
=
err
;
perror
(
"sock_set_error"
);
return
WSAEFAULT
;
}
#endif
return
err
;
}
...
...
@@ -282,7 +284,7 @@ BOOL netconn_close( netconn_t *conn )
conn
->
secure
=
FALSE
;
}
#endif
res
=
close
(
conn
->
socket
);
res
=
close
socket
(
conn
->
socket
);
conn
->
socket
=
-
1
;
if
(
res
==
-
1
)
{
...
...
@@ -464,7 +466,7 @@ BOOL netconn_query_data_available( netconn_t *conn, DWORD *available )
return
TRUE
;
}
#ifdef FIONREAD
if
(
!
(
ret
=
ioctl
(
conn
->
socket
,
FIONREAD
,
&
unread
)))
*
available
=
unread
;
if
(
!
(
ret
=
ioctl
socket
(
conn
->
socket
,
FIONREAD
,
&
unread
)))
*
available
=
unread
;
#endif
return
TRUE
;
}
...
...
dlls/winhttp/winhttp_private.h
View file @
a14d34b2
...
...
@@ -34,6 +34,12 @@
#endif
#if defined(__MINGW32__) || defined (_MSC_VER)
# include <ws2tcpip.h>
# ifndef MSG_WAITALL
# define MSG_WAITALL 0
# endif
#else
# define closesocket close
# define ioctlsocket ioctl
#endif
static
const
WCHAR
getW
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
...
...
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