Module: wine Branch: master Commit: 8e1b59cb9abd7fc2c54bf02db35e90705f3051de URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e1b59cb9abd7fc2c54bf02db3...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 22 19:55:05 2008 +0100
rpcrt4: Disable TCP/IP connection support if we don't have socketpair.
---
configure | 2 ++ configure.ac | 1 + dlls/rpcrt4/rpc_transport.c | 8 ++++++++ include/config.h.in | 3 +++ 4 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/configure b/configure index 2cc3711..ab27b58 100755 --- a/configure +++ b/configure @@ -17793,6 +17793,7 @@ esac
+ for ac_func in \ _pclose \ _popen \ @@ -17848,6 +17849,7 @@ for ac_func in \ sigaltstack \ sigprocmask \ snprintf \ + socketpair \ spawnvp \ statfs \ statvfs \ diff --git a/configure.ac b/configure.ac index 8ace1cb..be295a4 100644 --- a/configure.ac +++ b/configure.ac @@ -1410,6 +1410,7 @@ AC_CHECK_FUNCS(\ sigaltstack \ sigprocmask \ snprintf \ + socketpair \ spawnvp \ statfs \ statvfs \ diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 815ed64..d635d49 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -732,6 +732,8 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
/**** ncacn_ip_tcp support ****/
+#ifdef HAVE_SOCKETPAIR + typedef struct _RpcConnection_tcp { RpcConnection common; @@ -1372,6 +1374,8 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq return 1; }
+#endif /* HAVE_SOCKETPAIR */ + static const struct connection_ops conn_protseq_list[] = { { "ncacn_np", { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB }, @@ -1399,6 +1403,7 @@ static const struct connection_ops conn_protseq_list[] = { rpcrt4_ncalrpc_get_top_of_tower, rpcrt4_ncalrpc_parse_top_of_tower, }, +#ifdef HAVE_SOCKETPAIR { "ncacn_ip_tcp", { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP }, rpcrt4_conn_tcp_alloc, @@ -1412,6 +1417,7 @@ static const struct connection_ops conn_protseq_list[] = { rpcrt4_ncacn_ip_tcp_get_top_of_tower, rpcrt4_ncacn_ip_tcp_parse_top_of_tower, } +#endif };
@@ -1435,6 +1441,7 @@ static const struct protseq_ops protseq_list[] = rpcrt4_protseq_np_wait_for_new_connection, rpcrt4_protseq_ncalrpc_open_endpoint, }, +#ifdef HAVE_SOCKETPAIR { "ncacn_ip_tcp", rpcrt4_protseq_sock_alloc, @@ -1444,6 +1451,7 @@ static const struct protseq_ops protseq_list[] = rpcrt4_protseq_sock_wait_for_new_connection, rpcrt4_protseq_ncacn_ip_tcp_open_endpoint, }, +#endif };
#define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0])) diff --git a/include/config.h.in b/include/config.h.in index 1753e41..7f3b888 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -663,6 +663,9 @@ /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF
+/* Define to 1 if you have the `socketpair' function. */ +#undef HAVE_SOCKETPAIR + /* Define to 1 if you have the <soundcard.h> header file. */ #undef HAVE_SOUNDCARD_H