Module: wine
Branch: master
Commit: 0816f85b6b69dc1fa4f141c72a31d69b2e1ae1c3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0816f85b6b69dc1fa4f141c72…
Author: Bruno Jesus <00cpxxx(a)gmail.com>
Date: Sun Sep 8 01:47:46 2013 -0300
ws2_32: Implement WSADuplicateSocket[A|W] using a helper function.
---
dlls/ws2_32/socket.c | 51 ++++++++++++++++++++++---------------------------
1 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index ed55b64..833c713 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1546,6 +1546,27 @@ static int ws_sockaddr_u2ws(const struct sockaddr* uaddr, struct WS_sockaddr* ws
return res;
}
+static INT WS_DuplicateSocket(BOOL unicode, SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOW lpProtocolInfo)
+{
+ HANDLE hProcess;
+
+ TRACE("(unicode %d, socket %04lx, processid %x, buffer %p)\n",
+ unicode, s, dwProcessId, lpProtocolInfo);
+ memset(lpProtocolInfo, 0, unicode ? sizeof(WSAPROTOCOL_INFOW) : sizeof(WSAPROTOCOL_INFOA));
+ /* FIXME: WS_getsockopt(s, WS_SOL_SOCKET, SO_PROTOCOL_INFO, lpProtocolInfo, sizeof(*lpProtocolInfo)); */
+ /* I don't know what the real Windoze does next, this is a hack */
+ /* ...we could duplicate and then use ConvertToGlobalHandle on the duplicate, then let
+ * the target use the global duplicate, or we could copy a reference to us to the structure
+ * and let the target duplicate it from us, but let's do it as simple as possible */
+ hProcess = OpenProcess(PROCESS_DUP_HANDLE, FALSE, dwProcessId);
+ DuplicateHandle(GetCurrentProcess(), SOCKET2HANDLE(s),
+ hProcess, (LPHANDLE)&lpProtocolInfo->dwCatalogEntryId,
+ 0, FALSE, DUPLICATE_SAME_ACCESS);
+ CloseHandle(hProcess);
+ lpProtocolInfo->dwServiceFlags4 = 0xff00ff00; /* magic */
+ return 0;
+}
+
/*****************************************************************************
* WS_EnterSingleProtocolW [internal]
*
@@ -6405,22 +6426,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
*/
int WINAPI WSADuplicateSocketA( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOA lpProtocolInfo )
{
- HANDLE hProcess;
-
- TRACE("(%ld,%x,%p)\n", s, dwProcessId, lpProtocolInfo);
- memset(lpProtocolInfo, 0, sizeof(*lpProtocolInfo));
- /* FIXME: WS_getsockopt(s, WS_SOL_SOCKET, SO_PROTOCOL_INFO, lpProtocolInfo, sizeof(*lpProtocolInfo)); */
- /* I don't know what the real Windoze does next, this is a hack */
- /* ...we could duplicate and then use ConvertToGlobalHandle on the duplicate, then let
- * the target use the global duplicate, or we could copy a reference to us to the structure
- * and let the target duplicate it from us, but let's do it as simple as possible */
- hProcess = OpenProcess(PROCESS_DUP_HANDLE, FALSE, dwProcessId);
- DuplicateHandle(GetCurrentProcess(), SOCKET2HANDLE(s),
- hProcess, (LPHANDLE)&lpProtocolInfo->dwCatalogEntryId,
- 0, FALSE, DUPLICATE_SAME_ACCESS);
- CloseHandle(hProcess);
- lpProtocolInfo->dwServiceFlags4 = 0xff00ff00; /* magic */
- return 0;
+ return WS_DuplicateSocket(FALSE, s, dwProcessId, (LPWSAPROTOCOL_INFOW) lpProtocolInfo);
}
/***********************************************************************
@@ -6428,18 +6434,7 @@ int WINAPI WSADuplicateSocketA( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOA
*/
int WINAPI WSADuplicateSocketW( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOW lpProtocolInfo )
{
- HANDLE hProcess;
-
- TRACE("(%ld,%x,%p)\n", s, dwProcessId, lpProtocolInfo);
-
- memset(lpProtocolInfo, 0, sizeof(*lpProtocolInfo));
- hProcess = OpenProcess(PROCESS_DUP_HANDLE, FALSE, dwProcessId);
- DuplicateHandle(GetCurrentProcess(), SOCKET2HANDLE(s),
- hProcess, (LPHANDLE)&lpProtocolInfo->dwCatalogEntryId,
- 0, FALSE, DUPLICATE_SAME_ACCESS);
- CloseHandle(hProcess);
- lpProtocolInfo->dwServiceFlags4 = 0xff00ff00; /* magic */
- return 0;
+ return WS_DuplicateSocket(TRUE, s, dwProcessId, lpProtocolInfo);
}
/***********************************************************************
Module: wine
Branch: master
Commit: fe0a1a23fa7901ebcfba9943c62a29df98fd1f7c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fe0a1a23fa7901ebcfba9943c…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Fri Sep 6 20:40:02 2013 +0200
loader: Update French translation of wine manpage.
---
loader/wine.fr.man.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/loader/wine.fr.man.in b/loader/wine.fr.man.in
index 54807fc..2d4c543 100644
--- a/loader/wine.fr.man.in
+++ b/loader/wine.fr.man.in
@@ -51,6 +51,10 @@ un shell, par exemple :
.PP
wine C:\(rs\(rsProgram\(rs Files\(rs\(rsMonProg\(rs\(rstest.exe
.PP
+Il peut également s'agir d'un des exécutables Windows livrés avec Wine,
+auquel cas la spécification d'un chemin complet n'est pas obligatoire,
+p.ex. \fIwine explorer\fR ou \fIwine notepad\fR.
+.PP
.SH ENVIRONNEMENT
.B wine
passe les variables d'environnement du shell depuis lequel il