Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c91ae456
Commit
c91ae456
authored
Sep 03, 2004
by
Steven Edwards
Committed by
Alexandre Julliard
Sep 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Windows sockets when building Wininet on Mingw.
parent
925d3c26
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
23 deletions
+38
-23
configure
configure
+6
-2
configure.ac
configure.ac
+4
-2
Makefile.in
dlls/wininet/Makefile.in
+1
-1
ftp.c
dlls/wininet/ftp.c
+15
-15
internet.h
dlls/wininet/internet.h
+6
-0
netconnection.c
dlls/wininet/netconnection.c
+3
-3
winsock.h
include/winsock.h
+3
-0
No files found.
configure
View file @
c91ae456
...
...
@@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars
=
'SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS'
ac_subst_vars
=
'SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS
SOCKETLIBS
WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS'
ac_subst_files
=
'MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
# Initialize some variables set by options.
...
...
@@ -14217,7 +14217,10 @@ esac
case
$host_os
in
mingw32
*
)
CRTLIBS
=
"-lmsvcrt"
;;
SOCKETLIBS
=
"-lws2_32"
;;
esac
case
$host_os
in
...
...
@@ -20998,6 +21001,7 @@ s,@CROSSCC@,$CROSSCC,;t t
s,@CROSSWINDRES@,
$CROSSWINDRES
,;t t
s,@LDPATH@,
$LDPATH
,;t t
s,@CRTLIBS@,
$CRTLIBS
,;t t
s,@SOCKETLIBS@,
$SOCKETLIBS
,;t t
s,@WINE_BINARIES@,
$WINE_BINARIES
,;t t
s,@MAIN_BINARY@,
$MAIN_BINARY
,;t t
s,@LDD@,
$LDD
,;t t
...
...
configure.ac
View file @
c91ae456
...
...
@@ -984,10 +984,12 @@ case $build_os in
AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
esac
dnl Mingw needs explicit msvcrt for linking libwine
dnl Mingw needs explicit msvcrt for linking libwine
and winsock for wininet
case $host_os in
mingw32*)
AC_SUBST(CRTLIBS,"-lmsvcrt") ;;
AC_SUBST(CRTLIBS,"-lmsvcrt")
AC_SUBST(SOCKETLIBS,"-lws2_32")
;;
esac
case $host_os in
...
...
dlls/wininet/Makefile.in
View file @
c91ae456
...
...
@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
wininet.dll
IMPORTS
=
mpr shlwapi shell32 user32 advapi32 kernel32 ntdll
EXTRALIBS
=
$(LIBUNICODE)
EXTRALIBS
=
$(LIBUNICODE)
@SOCKETLIBS@
C_SRCS
=
\
cookie.c
\
...
...
dlls/wininet/ftp.c
View file @
c91ae456
...
...
@@ -272,7 +272,7 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
if
(
FTP_GetDataSocket
(
lpwfs
,
&
nDataSocket
))
{
FTP_SendData
(
lpwfs
,
nDataSocket
,
hFile
);
close
(
nDataSocket
);
close
socket
(
nDataSocket
);
nResCode
=
FTP_ReceiveResponse
(
lpwfs
,
dwContext
);
if
(
nResCode
)
{
...
...
@@ -286,7 +286,7 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
lend:
if
(
lpwfs
->
lstnSocket
!=
-
1
)
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
&&
hIC
->
lpfnStatusCB
)
{
...
...
@@ -691,7 +691,7 @@ HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
if
(
FTP_GetDataSocket
(
lpwfs
,
&
nDataSocket
))
{
hFindNext
=
FTP_ReceiveFileList
(
lpwfs
,
nDataSocket
,
lpszSearchFile
,
lpFindFileData
,
dwContext
);
close
(
nDataSocket
);
close
socket
(
nDataSocket
);
nResCode
=
FTP_ReceiveResponse
(
lpwfs
,
lpwfs
->
hdr
.
dwContext
);
if
(
nResCode
!=
226
&&
nResCode
!=
250
)
INTERNET_SetLastError
(
ERROR_NO_MORE_FILES
);
...
...
@@ -703,7 +703,7 @@ HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
lend:
if
(
lpwfs
->
lstnSocket
!=
-
1
)
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
&&
hIC
->
lpfnStatusCB
)
{
...
...
@@ -1034,7 +1034,7 @@ HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs,
}
if
(
lpwfs
->
lstnSocket
!=
-
1
)
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
hIC
=
(
LPWININETAPPINFOW
)
lpwfs
->
hdr
.
lpwhparent
;
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
&&
hIC
->
lpfnStatusCB
)
...
...
@@ -1207,13 +1207,13 @@ BOOL WINAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
else
FTP_SetResponseError
(
nResCode
);
}
close
(
nDataSocket
);
close
socket
(
nDataSocket
);
}
}
lend:
if
(
lpwfs
->
lstnSocket
!=
-
1
)
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
if
(
hFile
)
CloseHandle
(
hFile
);
...
...
@@ -1741,7 +1741,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
lerror:
if
(
!
bSuccess
&&
nsocket
==
-
1
)
close
(
nsocket
);
close
socket
(
nsocket
);
if
(
!
bSuccess
&&
lpwfs
)
{
...
...
@@ -2066,7 +2066,7 @@ BOOL FTP_SendStore(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, DWORD dwT
lend:
if
(
!
bSuccess
&&
lpwfs
->
lstnSocket
!=
-
1
)
{
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
lpwfs
->
lstnSocket
=
-
1
;
}
...
...
@@ -2122,7 +2122,7 @@ BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs)
lend:
if
(
!
bSuccess
&&
lpwfs
->
lstnSocket
==
-
1
)
{
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
lpwfs
->
lstnSocket
=
-
1
;
}
...
...
@@ -2386,7 +2386,7 @@ BOOL FTP_GetDataSocket(LPWININETFTPSESSIONW lpwfs, LPINT nDataSocket)
else
{
*
nDataSocket
=
accept
(
lpwfs
->
lstnSocket
,
(
struct
sockaddr
*
)
&
saddr
,
&
addrlen
);
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
lpwfs
->
lstnSocket
=
-
1
;
}
return
*
nDataSocket
!=
-
1
;
...
...
@@ -2518,7 +2518,7 @@ DWORD FTP_SendRetrieve(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, DWORD
lend:
if
(
0
==
nResult
&&
lpwfs
->
lstnSocket
!=
-
1
)
{
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
lpwfs
->
lstnSocket
=
-
1
;
}
...
...
@@ -2600,10 +2600,10 @@ static void FTP_CloseSessionHandle(LPWININETHANDLEHEADER hdr)
lpwfs
->
download_in_progress
->
session_deleted
=
TRUE
;
if
(
lpwfs
->
sndSocket
!=
-
1
)
close
(
lpwfs
->
sndSocket
);
close
socket
(
lpwfs
->
sndSocket
);
if
(
lpwfs
->
lstnSocket
!=
-
1
)
close
(
lpwfs
->
lstnSocket
);
close
socket
(
lpwfs
->
lstnSocket
);
if
(
lpwfs
->
lpszPassword
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwfs
->
lpszPassword
);
...
...
@@ -2668,7 +2668,7 @@ static void FTP_CloseFileTransferHandle(LPWININETHANDLEHEADER hdr)
nResCode
=
FTP_ReceiveResponse
(
lpwfs
,
lpwfs
->
hdr
.
dwContext
);
if
(
lpwh
->
nDataSocket
!=
-
1
)
close
(
lpwh
->
nDataSocket
);
close
socket
(
lpwh
->
nDataSocket
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwh
);
}
...
...
dlls/wininet/internet.h
View file @
c91ae456
...
...
@@ -45,6 +45,12 @@
# include <sys/socket.h>
#endif
#ifdef __MINGW32__
#include "winsock2.h"
#else
#define closesocket close
#endif
/* __MINGW32__ */
/* used for netconnection.c stuff */
typedef
struct
{
...
...
dlls/wininet/netconnection.c
View file @
c91ae456
...
...
@@ -228,7 +228,7 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
if
(
!
connection
->
useSSL
)
{
int
result
;
result
=
close
(
connection
->
socketFD
);
result
=
close
socket
(
connection
->
socketFD
);
connection
->
socketFD
=
-
1
;
if
(
result
==
-
1
)
return
FALSE
;
...
...
@@ -237,7 +237,7 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
else
{
#ifdef HAVE_OPENSSL_SSL_H
close
(
connection
->
ssl_sock
);
close
socket
(
connection
->
ssl_sock
);
connection
->
ssl_sock
=
-
1
;
/* FIXME should we call SSL_shutdown here?? Probably on whatever is the
* opposite of NETCON_init.... */
...
...
@@ -262,7 +262,7 @@ BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *se
result
=
connect
(
connection
->
socketFD
,
serv_addr
,
addrlen
);
if
(
result
==
-
1
)
{
close
(
connection
->
socketFD
);
close
socket
(
connection
->
socketFD
);
connection
->
socketFD
=
-
1
;
return
FALSE
;
}
...
...
include/winsock.h
View file @
c91ae456
...
...
@@ -408,11 +408,14 @@ typedef struct WS(fd_set)
# endif
}
WS
(
fd_set
),
FD_SET
,
*
PFD_SET
,
*
LPFD_SET
;
#ifndef _TIMEVAL_DEFINED
#define _TIMEVAL_DEFINED
typedef
struct
WS
(
timeval
)
{
long
tv_sec
;
/* seconds */
long
tv_usec
;
/* and microseconds */
}
TIMEVAL
,
*
PTIMEVAL
,
*
LPTIMEVAL
;
#endif
#define WINE_FD_CLR(fd, set, cast) do { \
u_int __i; \
...
...
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