summaryrefslogtreecommitdiff
path: root/user/wine/dlclose.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-23 02:46:59 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:02 -0500
commit369f3e155d53cd137b1a67bc45c346e3f6c38f3e (patch)
treec68cc8de543d442034bbe7113a0500df74d63395 /user/wine/dlclose.patch
parent184289390da6bf880dcac40699f67182136716f8 (diff)
downloadpackages-369f3e155d53cd137b1a67bc45c346e3f6c38f3e.tar.gz
packages-369f3e155d53cd137b1a67bc45c346e3f6c38f3e.tar.bz2
packages-369f3e155d53cd137b1a67bc45c346e3f6c38f3e.tar.xz
packages-369f3e155d53cd137b1a67bc45c346e3f6c38f3e.zip
user/wine: Update to 7.0 (WIP)
Diffstat (limited to 'user/wine/dlclose.patch')
-rw-r--r--user/wine/dlclose.patch66
1 files changed, 0 insertions, 66 deletions
diff --git a/user/wine/dlclose.patch b/user/wine/dlclose.patch
deleted file mode 100644
index a9844ff68..000000000
--- a/user/wine/dlclose.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1123,6 +1123,12 @@ then
-
- dnl *** End of X11/Xlib.h check
-
-+ dnl Check for the unload_after_dlclose libc
-+ AC_RUN_IFELSE(
-+ [AC_LANG_PROGRAM([[#include <dlfcn.h>]], [[dlclose(dlopen("./conftest", 0)); return 0;]])],
-+ ac_save_CPPFLAGS="$ac_save_CPPFLAGS -DNO_UNLOAD_AFTER_DLCLOSE",
-+ [])
-+
- dnl Check for the presence of OpenGL
- opengl_msg=""
- if test "x$with_opengl" != "xno"
---- a/dlls/ntdll/loader.c
-+++ b/dlls/ntdll/loader.c
-@@ -2289,6 +2289,13 @@
- if (mod->Flags & LDR_WINE_INTERNAL && mod->SectionHandle == handle)
- {
- info.wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
-+#ifdef NO_UNLOAD_AFTER_DLCLOSE
-+ if (info.wm->ldr.LoadCount == 0) {
-+ RtlEnterCriticalSection( &loader_section );
-+ info.wm->ldr.LoadCount = 1;
-+ RtlLeaveCriticalSection( &loader_section );
-+ }
-+#endif
- TRACE( "Found %s at %p for builtin %s\n",
- debugstr_w(info.wm->ldr.FullDllName.Buffer), info.wm->ldr.BaseAddress, debugstr_w(path) );
- break;
-@@ -3199,6 +3199,9 @@
- * LdrShutdownProcess (NTDLL.@)
- *
- */
-+#ifdef NO_UNLOAD_AFTER_DLCLOSE
-+static void MODULE_FlushModrefs(void);
-+#endif
- void WINAPI LdrShutdownProcess(void)
- {
- TRACE("()\n");
-@@ -3194,6 +3203,12 @@
- TRACE("()\n");
-+#ifdef NO_UNLOAD_AFTER_DLCLOSE
-+ RtlEnterCriticalSection( &loader_section );
-+ process_detach();
-+ MODULE_FlushModrefs();
-+ RtlLeaveCriticalSection( &loader_section );
-+#endif
- process_detaching = TRUE;
- process_detach();
- }
-
-
-@@ -3384,7 +3398,11 @@
- if ( free_lib_count <= 1 )
- {
-+#ifdef NO_UNLOAD_AFTER_DLCLOSE
-+ TRACE("apply no-op dlclose hacks on this platform\n");
-+#else
- process_detach();
- MODULE_FlushModrefs();
-+#endif
- }
-
- TRACE("END\n");