Author: tfaber
Date: Sun Jun 18 16:41:23 2017
New Revision: 75098
URL:
http://svn.reactos.org/svn/reactos?rev=75098&view=rev
Log:
[LIBTIRPC]
- Fix MSVC build
CORE-8204
Modified:
trunk/reactos/dll/win32/libtirpc/CMakeLists.txt
trunk/reactos/dll/win32/libtirpc/src/auth_time.c
trunk/reactos/dll/win32/libtirpc/src/auth_unix.c
trunk/reactos/dll/win32/libtirpc/src/bindresvport.c
trunk/reactos/dll/win32/libtirpc/src/clnt_vc.c
trunk/reactos/dll/win32/libtirpc/src/rpc_generic.c
Modified: trunk/reactos/dll/win32/libtirpc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/CMakeLists.txt [iso-8859-1] Sun Jun 18 16:41:23 2017
@@ -1,6 +1,6 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
-add_definitions(-DUNICODE -D_WIN32 -DPORTMAP)
+add_definitions(-DUNICODE -D_WIN32 -DPORTMAP -Dstrdup=_strdup)
include_directories(${REACTOS_SOURCE_DIR}/dll/win32/libtirpc/tirpc)
@@ -94,11 +94,10 @@
if(MSVC)
else()
# FIXME: Tons of warnings.
- replace_compile_flags("-Werror" " ")
+ add_target_compile_flags(libtirpc "-w")
endif()
set_module_type(libtirpc win32dll)
-target_link_libraries(libtirpc user32 advapi32)
-add_importlibs(libtirpc kernel32 kernel32_vista ws2_32 msvcrt)
+add_importlibs(libtirpc user32 advapi32 kernel32_vista ws2_32 msvcrt kernel32 ntdll)
add_delay_importlibs(libtirpc secur32)
add_cd_file(TARGET libtirpc DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/libtirpc/src/auth_time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/src/aut…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/src/auth_time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/src/auth_time.c [iso-8859-1] Sun Jun 18 16:41:23
2017
@@ -248,7 +248,9 @@
char ut[64], ipuaddr[64];
endpoint teps[32];
nis_server tsrv;
+#ifndef __REACTOS__
void (*oldsig)() = NULL; /* old alarm handler */
+#endif
struct sockaddr_in sin;
SOCKET s = RPC_ANYSOCK;
socklen_t len;
Modified: trunk/reactos/dll/win32/libtirpc/src/auth_unix.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/src/aut…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/src/auth_unix.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/src/auth_unix.c [iso-8859-1] Sun Jun 18 16:41:23
2017
@@ -376,10 +376,21 @@
}
static bool_t
+#ifndef __REACTOS__
authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t func, caddr_t args, u_int seq)
+#else
+authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t func, caddr_t args)
+#endif
{
return ((*func)(xdrs, args));
}
+#ifdef __REACTOS__
+static bool_t
+authunix_unwrap(AUTH *auth, XDR *xdrs, xdrproc_t func, caddr_t args, u_int seq)
+{
+ return ((*func)(xdrs, args));
+}
+#endif
static struct auth_ops *
authunix_ops()
@@ -397,7 +408,11 @@
ops.ah_refresh = authunix_refresh;
ops.ah_destroy = authunix_destroy;
ops.ah_wrap = authunix_wrap;
+#ifndef __REACTOS__
ops.ah_unwrap = authunix_wrap;
+#else
+ ops.ah_unwrap = authunix_unwrap;
+#endif
}
mutex_unlock(&ops_lock);
return (&ops);
Modified: trunk/reactos/dll/win32/libtirpc/src/bindresvport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/src/bin…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/src/bindresvport.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/src/bindresvport.c [iso-8859-1] Sun Jun 18 16:41:23
2017
@@ -186,7 +186,9 @@
#ifdef _WIN32
memset(sa, 0, salen);
if (error = getsockopt(sd, SOL_SOCKET, SO_PROTOCOL_INFO, (char *)&proto_info,
&proto_info_size) == SOCKET_ERROR) {
+#ifndef __REACTOS__
int sockerr = WSAGetLastError();
+#endif
return -1;
}
af = proto_info.iAddressFamily;
@@ -244,7 +246,9 @@
error = bind(sd, sa, salen);
if (error) {
+#ifndef __REACTOS__
int err = WSAGetLastError();
+#endif
}
#ifdef IPV6_PORTRANGE
Modified: trunk/reactos/dll/win32/libtirpc/src/clnt_vc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/src/cln…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/src/clnt_vc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/src/clnt_vc.c [iso-8859-1] Sun Jun 18 16:41:23 2017
@@ -1025,17 +1025,24 @@
}
static int
+#ifndef __REACTOS__
write_vc(ctp, buf, len)
+#else
+write_vc(ctp, ptr, len)
+#endif
void *ctp;
#ifndef __REACTOS__
char *buf;
#else
- void *buf;
+ void *ptr;
#endif
int len;
{
struct ct_data *ct = (struct ct_data *)ctp;
int i = 0, cnt;
+#ifdef __REACTOS__
+ char *buf = ptr;
+#endif
for (cnt = len; cnt > 0; cnt -= i, buf += i) {
if ((i = send(ct->ct_fd, buf, (size_t)cnt, 0)) == SOCKET_ERROR) {
Modified: trunk/reactos/dll/win32/libtirpc/src/rpc_generic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/libtirpc/src/rpc…
==============================================================================
--- trunk/reactos/dll/win32/libtirpc/src/rpc_generic.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/libtirpc/src/rpc_generic.c [iso-8859-1] Sun Jun 18 16:41:23
2017
@@ -488,7 +488,9 @@
WSAPROTOCOL_INFO proto_info;
int proto_info_size = sizeof(proto_info);
if (getsockopt(fd, SOL_SOCKET, SO_PROTOCOL_INFO, (char *)&proto_info,
&proto_info_size) == SOCKET_ERROR) {
+#ifndef __REACTOS__
int err = WSAGetLastError();
+#endif
return 0;
}
len = proto_info.iMaxSockAddr;
@@ -503,7 +505,9 @@
len = sizeof type;
if (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&type, &len) == SOCKET_ERROR) {
+#ifndef __REACTOS__
int err = WSAGetLastError();
+#endif
return 0;
}