diff --git a/patches/netutils-dll/0001-netutils-New-DLL.patch b/patches/netutils-dll/0001-netutils-New-DLL.patch new file mode 100644 index 00000000..e3b59f49 --- /dev/null +++ b/patches/netutils-dll/0001-netutils-New-DLL.patch @@ -0,0 +1,116 @@ +From 0cfece3e266a2f33385827d97cbee0f9c44e12c3 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 26 Aug 2020 18:06:57 +1000 +Subject: [PATCH] netutils: New DLL + +--- + configure.ac | 1 + + dlls/netutils/Makefile.in | 5 +++++ + dlls/netutils/main.c | 41 +++++++++++++++++++++++++++++++++++++ + dlls/netutils/netutils.spec | 22 ++++++++++++++++++++ + 4 files changed, 69 insertions(+) + create mode 100644 dlls/netutils/Makefile.in + create mode 100644 dlls/netutils/main.c + create mode 100644 dlls/netutils/netutils.spec + +diff --git a/configure.ac b/configure.ac +index 2dc829893dd..2bb56f29e30 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3651,6 +3651,7 @@ WINE_CONFIG_MAKEFILE(dlls/netcfgx/tests) + WINE_CONFIG_MAKEFILE(dlls/netio.sys) + WINE_CONFIG_MAKEFILE(dlls/netprofm) + WINE_CONFIG_MAKEFILE(dlls/netprofm/tests) ++WINE_CONFIG_MAKEFILE(dlls/netutils) + WINE_CONFIG_MAKEFILE(dlls/newdev) + WINE_CONFIG_MAKEFILE(dlls/ninput) + WINE_CONFIG_MAKEFILE(dlls/ninput/tests) +diff --git a/dlls/netutils/Makefile.in b/dlls/netutils/Makefile.in +new file mode 100644 +index 00000000000..21589e07b8b +--- /dev/null ++++ b/dlls/netutils/Makefile.in +@@ -0,0 +1,5 @@ ++MODULE = netutils.dll ++ ++EXTRADLLFLAGS = -mno-cygwin ++ ++C_SRCS = main.c +diff --git a/dlls/netutils/main.c b/dlls/netutils/main.c +new file mode 100644 +index 00000000000..503e0ef7bfb +--- /dev/null ++++ b/dlls/netutils/main.c +@@ -0,0 +1,41 @@ ++/* ++ * ++ * Copyright (C) 2020 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#include ++ ++#include "windef.h" ++#include "winbase.h" ++#include "wine/debug.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(netutils); ++ ++BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) ++{ ++ TRACE("(%p, %u, %p)\n", instance, reason, reserved); ++ ++ switch (reason) ++ { ++ case DLL_WINE_PREATTACH: ++ return FALSE; /* prefer native version */ ++ case DLL_PROCESS_ATTACH: ++ DisableThreadLibraryCalls(instance); ++ break; ++ } ++ ++ return TRUE; ++} +diff --git a/dlls/netutils/netutils.spec b/dlls/netutils/netutils.spec +new file mode 100644 +index 00000000000..ff022af2c57 +--- /dev/null ++++ b/dlls/netutils/netutils.spec +@@ -0,0 +1,22 @@ ++@ stub NetApiBufferAllocate ++@ stub NetApiBufferFree ++@ stub NetApiBufferReallocate ++@ stub NetApiBufferSize ++@ stub NetRemoteComputerSupports ++@ stub NetapipBufferAllocate ++@ stub NetpIsComputerNameValid ++@ stub NetpIsDomainNameValid ++@ stub NetpIsGroupNameValid ++@ stub NetpIsRemote ++@ stub NetpIsRemoteNameValid ++@ stub NetpIsShareNameValid ++@ stub NetpIsUncComputerNameValid ++@ stub NetpIsUserNameValid ++@ stub NetpwListCanonicalize ++@ stub NetpwListTraverse ++@ stub NetpwNameCanonicalize ++@ stub NetpwNameCompare ++@ stub NetpwNameValidate ++@ stub NetpwPathCanonicalize ++@ stub NetpwPathCompare ++@ stub NetpwPathType +-- +2.28.0 + diff --git a/patches/netutils-dll/definition b/patches/netutils-dll/definition new file mode 100644 index 00000000..f81f7217 --- /dev/null +++ b/patches/netutils-dll/definition @@ -0,0 +1 @@ +Fixes: [49739] Add netutils dll diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 89cb32fd..a67f8d5a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -157,6 +157,7 @@ patch_enable_all () enable_mshtml_TranslateAccelerator="$1" enable_msi_msi_vcl_get_cost="$1" enable_msvcrt_Math_Precision="$1" + enable_netutils_dll="$1" enable_ntdll_APC_Performance="$1" enable_ntdll_Activation_Context="$1" enable_ntdll_ApiSetMap="$1" @@ -560,6 +561,9 @@ patch_enable () msvcrt-Math_Precision) enable_msvcrt_Math_Precision="$2" ;; + netutils-dll) + enable_netutils_dll="$2" + ;; ntdll-APC_Performance) enable_ntdll_APC_Performance="$2" ;; @@ -3297,6 +3301,21 @@ if test "$enable_msvcrt_Math_Precision" -eq 1; then ) >> "$patchlist" fi +# Patchset netutils-dll +# | +# | This patchset fixes the following Wine bugs: +# | * [#49739] Add netutils dll +# | +# | Modified files: +# | * configure.ac, dlls/netutils/Makefile.in, dlls/netutils/main.c, dlls/netutils/netutils.spec +# | +if test "$enable_netutils_dll" -eq 1; then + patch_apply netutils-dll/0001-netutils-New-DLL.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "netutils: New DLL.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-APC_Performance # | # | Modified files: