From 86e1be611466b3a397824dd67a8502a0ea031446 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Sun, 1 Dec 2019 02:23:52 -0800 Subject: [PATCH] sockets: Remove piecemeal ifndef ENABLE_NETCORE since the file has it broadly. Commit migrated from https://github.com/mono/mono/commit/fffeb232394e2e762bb1d0f9ac67b808696379c6 --- src/mono/mono/metadata/w32socket.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/mono/mono/metadata/w32socket.c b/src/mono/mono/metadata/w32socket.c index cecb93d..4ff7066 100644 --- a/src/mono/mono/metadata/w32socket.c +++ b/src/mono/mono/metadata/w32socket.c @@ -742,7 +742,6 @@ get_socket_assembly (void) return domain->socket_assembly; } -#ifndef ENABLE_NETCORE gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal (MonoObjectHandle this_obj, gint32 family, gint32 type, gint32 proto, gint32 *werror, MonoError *error) { @@ -799,7 +798,6 @@ ves_icall_System_Net_Sockets_Socket_Close_internal (gsize sock, gint32 *werror, mono_w32socket_close ((SOCKET) sock); } -#endif gint32 ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal (void) @@ -809,7 +807,6 @@ ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal (void) return mono_w32socket_get_last_error (); } -#ifndef ENABLE_NETCORE gint32 ves_icall_System_Net_Sockets_Socket_Available_internal (gsize sock, gint32 *werror, MonoError *error) { @@ -871,7 +868,6 @@ ves_icall_System_Net_Sockets_Socket_Listen_internal(gsize sock, guint32 backlog, if (ret == SOCKET_ERROR) *werror = mono_w32socket_get_last_error (); } -#endif #ifdef HAVE_STRUCT_SOCKADDR_IN6 // Check whether it's ::ffff::0:0. @@ -1086,7 +1082,6 @@ exit: return result; } -#ifndef ENABLE_NETCORE MonoObjectHandle ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal (gsize sock, gint32 af, gint32 *werror, MonoError *error) { @@ -1098,7 +1093,6 @@ ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_internal (gsize sock, gint32 { return mono_w32socket_getname (sock, af, FALSE, werror, error); } -#endif static struct sockaddr* create_sockaddr_from_handle (MonoObjectHandle saddr_obj, socklen_t *sa_size, gint32 *werror, MonoError *error) @@ -1225,7 +1219,6 @@ create_sockaddr_from_handle (MonoObjectHandle saddr_obj, socklen_t *sa_size, gin } } -#ifndef ENABLE_NETCORE void ves_icall_System_Net_Sockets_Socket_Bind_internal (gsize sock, MonoObjectHandle sockaddr, gint32 *werror, MonoError *error) { @@ -1564,7 +1557,6 @@ ves_icall_System_Net_Sockets_Socket_SendTo_internal (gsize sock, gchar *buffer, g_free(sa); return ret; } -#endif /* ENABLE_NETCORE */ static SOCKET Socket_to_SOCKET (MonoObjectHandle sockobj) @@ -1635,7 +1627,6 @@ leave: HANDLE_FUNCTION_RETURN (); } -#ifndef ENABLE_NETCORE void ves_icall_System_Net_Sockets_Socket_Select_internal (MonoArrayHandleOut sockets, gint32 timeout, gint32 *werror, MonoError *error) { @@ -1934,7 +1925,6 @@ ves_icall_System_Net_Sockets_Socket_GetSocketOption_arr_internal (gsize sock, gi if (ret == SOCKET_ERROR) *werror = mono_w32socket_get_last_error (); } -#endif #if defined(HAVE_STRUCT_IP_MREQN) || defined(HAVE_STRUCT_IP_MREQ) static struct in_addr @@ -2020,7 +2010,6 @@ get_local_interface_id (int family) #endif /* defined(__APPLE__) || defined(__FreeBSD__) */ #endif /* HAVE_STRUCT_SOCKADDR_IN6 */ -#ifndef ENABLE_NETCORE void ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal (gsize sock, gint32 level, gint32 name, MonoObjectHandle obj_val, MonoArrayHandle byte_val, gint32 int_val, gint32 *werror, MonoError *error) { @@ -2321,7 +2310,6 @@ ves_icall_System_Net_Sockets_Socket_IOControl_internal (gsize sock, gint32 code, return (gint)output_bytes; } -#endif static gboolean addrinfo_add_string (MonoDomain *domain, const char *s, MonoArrayHandle arr, int index, MonoError *error) @@ -2455,7 +2443,6 @@ leave: HANDLE_FUNCTION_RETURN_VAL (is_ok (error)); } -#ifndef ENABLE_NETCORE MonoBoolean ves_icall_System_Net_Dns_GetHostByName_internal (MonoStringHandle host, MonoStringHandleOut h_name, MonoArrayHandleOut h_aliases, MonoArrayHandleOut h_addr_list, gint32 hint, MonoError *error) { @@ -2642,7 +2629,6 @@ ves_icall_System_Net_Sockets_Socket_SendFile_internal (gsize sock, MonoStringHan return ret; } #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) */ -#endif /* ENABLE_NETCORE */ void mono_network_init (void) @@ -2658,7 +2644,6 @@ mono_network_cleanup (void) mono_networking_shutdown (); } -#ifndef ENABLE_NETCORE void ves_icall_cancel_blocking_socket_operation (MonoThreadObjectHandle thread, MonoError *error) { @@ -2669,7 +2654,6 @@ ves_icall_cancel_blocking_socket_operation (MonoThreadObjectHandle thread, MonoE guint64 tid = mono_internal_thread_handle_ptr (internal)->tid; mono_thread_info_abort_socket_syscall_for_close (MONO_UINT_TO_NATIVE_THREAD_ID (tid)); } -#endif #else @@ -2683,4 +2667,4 @@ mono_network_cleanup (void) { } -#endif /* #ifndef DISABLE_SOCKETS */ +#endif // !defined(DISABLE_SOCKETS) && !defined(ENABLE_NETCORE) -- 2.7.4