- Add ros-specific changes patch.

- Set svn:eol-style properties.

svn path=/trunk/; revision=31632
This commit is contained in:
Aleksey Bragin 2008-01-06 16:33:52 +00:00
parent ecdee48d72
commit 1a8f12eaee
30 changed files with 17137 additions and 17151 deletions

View file

@ -1,28 +0,0 @@
/*
* RPC definitions
*
* Copyright 2003 Ove Kåven, TransGaming Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#ifndef __WINE_RPC_MISC_H
#define __WINE_RPC_MISC_H
/* flags for RPC_MESSAGE.RpcFlags */
#define WINE_RPCFLAG_EXCEPTION 0x0001
#endif /* __WINE_RPC_MISC_H */

View file

@ -1,101 +1,115 @@
Index: rpc_transport.c --- H:\Working Copies\wine\dlls\rpcrt4\rpc_transport.c Sun Jan 06 19:27:38 2008
=================================================================== +++ H:\Working Copies\ReactOS\trunk\reactos\dll\win32\rpcrt4\rpc_transport.c Sun Jan 06 19:28:07 2008
--- rpc_transport.c (revision 27793) @@ -56,6 +56,9 @@
+++ rpc_transport.c (working copy)
@@ -56,9 +56,6 @@
#include <sys/poll.h> #include <sys/poll.h>
#endif #endif
-#include <winsock2.h> +#include <winsock2.h>
-#include <ws2tcpip.h> +#include <ws2tcpip.h>
- +
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winnls.h" #include "winnls.h"
@@ -76,8 +73,6 @@ @@ -73,6 +76,8 @@
#include "rpc_server.h" #include "rpc_server.h"
#include "epm_towers.h" #include "epm_towers.h"
-#include "unix_func.h" +#include "unix_func.h"
- +
#ifndef SOL_TCP #ifndef SOL_TCP
# define SOL_TCP IPPROTO_TCP # define SOL_TCP IPPROTO_TCP
#endif #endif
@@ -781,7 +776,7 @@ @@ -128,7 +133,7 @@
RpcConnection_np *npc = (RpcConnection_np *) Connection;
TRACE("listening on %s\n", pname);
- npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX,
+ npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE,
PIPE_UNLIMITED_INSTANCES,
RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
@@ -715,12 +720,14 @@
if (tcpc == NULL)
return NULL;
tcpc->sock = -1;
+#ifndef __REACTOS__
if (socketpair(PF_UNIX, SOCK_STREAM, 0, tcpc->cancel_fds) < 0)
{
ERR("socketpair() failed: %s\n", strerror(errno));
HeapFree(GetProcessHeap(), 0, tcpc);
return NULL;
}
+#endif
return &tcpc->common;
}
@@ -785,8 +792,7 @@
/* RPC depends on having minimal latency so disable the Nagle algorithm */ /* RPC depends on having minimal latency so disable the Nagle algorithm */
val = 1; val = 1;
- setsockopt(sock, SOL_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); - setsockopt(sock, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
+ setsockopt(sock, SOL_TCP, TCP_NODELAY, &val, sizeof(val)); - fcntl(sock, F_SETFL, O_NONBLOCK); /* make socket nonblocking */
+ setsockopt(sock, SOL_TCP, TCP_NODELAY, (char *)&val, sizeof(val));
tcpc->sock = sock; tcpc->sock = sock;
@@ -804,7 +799,6 @@ @@ -808,6 +814,7 @@
struct addrinfo *ai;
struct addrinfo *ai_cur; struct addrinfo *ai_cur;
struct addrinfo hints; struct addrinfo hints;
+ u_long blocking;
RpcConnection *first_connection = NULL; RpcConnection *first_connection = NULL;
- u_long blocking;
TRACE("(%p, %s)\n", protseq, endpoint); TRACE("(%p, %s)\n", protseq, endpoint);
@@ -859,7 +866,7 @@
@@ -855,7 +849,7 @@
{ {
WARN("bind failed: %s\n", strerror(errno)); WARN("bind failed: %s\n", strerror(errno));
close(sock); close(sock);
- if (errno == WSAEADDRINUSE) - if (errno == EADDRINUSE)
+ if (errno == EADDRINUSE) + if (errno == WSAEADDRINUSE)
status = RPC_S_DUPLICATE_ENDPOINT; status = RPC_S_DUPLICATE_ENDPOINT;
else else
status = RPC_S_CANT_CREATE_ENDPOINT; status = RPC_S_CANT_CREATE_ENDPOINT;
@@ -884,8 +878,7 @@ @@ -888,7 +895,8 @@
* race-condition (poll() says it is readable, connection drops, * race-condition (poll() says it is readable, connection drops,
* and accept() blocks until the next connection comes...) * and accept() blocks until the next connection comes...)
*/ */
- blocking = 1; - ret = fcntl(sock, F_SETFL, O_NONBLOCK);
- ret = ioctlsocket(sock, FIONBIO, &blocking); + blocking = 1;
+ ret = fcntl(sock, F_SETFL, O_NONBLOCK); + ret = ioctlsocket(sock, FIONBIO, &blocking);
if (ret < 0) if (ret < 0)
{ {
WARN("couldn't make socket non-blocking, error %d\n", ret); WARN("couldn't make socket non-blocking, error %d\n", ret);
@@ -928,7 +921,6 @@ @@ -931,6 +939,7 @@
int ret; int ret;
struct sockaddr_in address; struct sockaddr_in address;
socklen_t addrsize; socklen_t addrsize;
- u_long blocking; + u_long blocking;
RpcConnection_tcp *server = (RpcConnection_tcp*) old_conn; RpcConnection_tcp *server = (RpcConnection_tcp*) old_conn;
RpcConnection_tcp *client = (RpcConnection_tcp*) new_conn; RpcConnection_tcp *client = (RpcConnection_tcp*) new_conn;
@@ -940,8 +932,7 @@ @@ -942,7 +951,8 @@
return RPC_S_OUT_OF_RESOURCES; return RPC_S_OUT_OF_RESOURCES;
} }
/* reset to blocking behaviour */ /* reset to blocking behaviour */
- blocking = 0; - fcntl(ret, F_SETFL, 0);
- ret = ioctlsocket(ret, FIONBIO, &blocking); + blocking = 0;
+ fcntl(ret, F_SETFL, 0); + ret = ioctlsocket(ret, FIONBIO, &blocking);
client->sock = ret; client->sock = ret;
TRACE("Accepted a new TCP connection\n"); TRACE("Accepted a new TCP connection\n");
return RPC_S_OK; return RPC_S_OK;
@@ -1125,12 +1116,10 @@ @@ -1189,10 +1199,12 @@
if (ps) if (ps)
{ {
int fds[2]; int fds[2];
- u_long blocking; + u_long blocking;
if (!socketpair(PF_UNIX, SOCK_DGRAM, 0, fds)) if (!socketpair(PF_UNIX, SOCK_DGRAM, 0, fds))
{ {
- blocking = 1; - fcntl(fds[0], F_SETFL, O_NONBLOCK);
- ioctlsocket(fds[0], FIONBIO, &blocking); - fcntl(fds[1], F_SETFL, O_NONBLOCK);
- ioctlsocket(fds[1], FIONBIO, &blocking); + blocking = 1;
+ fcntl(fds[0], F_SETFL, O_NONBLOCK); + ioctlsocket(fds[0], FIONBIO, &blocking);
+ fcntl(fds[1], F_SETFL, O_NONBLOCK); + ioctlsocket(fds[1], FIONBIO, &blocking);
ps->mgr_event_rcv = fds[0]; ps->mgr_event_rcv = fds[0];
ps->mgr_event_snd = fds[1]; ps->mgr_event_snd = fds[1];
} }
@@ -1211,7 +1200,7 @@
if (!poll_info)
return -1;
-
+
ret = poll(poll_info, count, -1);
if (ret < 0)
{