https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=39078c96592056ca46e885830b20444e1703f5fc

commit 39078c96592056ca46e885830b20444e1703f5fc
Author:     Corinna Vinschen <cori...@vinschen.de>
AuthorDate: Sun Mar 30 20:47:03 2025 +0200
Commit:     Corinna Vinschen <cori...@vinschen.de>
CommitDate: Sun Mar 30 20:57:00 2025 +0200

    Cygwin: dlopen: rename gmheflags to nodelete
    
    It's more helpful when reading the source.
    
    Signed-off-by: Corinna Vinschen <cori...@vinschen.de>
    
    (cherry picked from commit d9ca2c88c4dde02a23f2058833429e0e47490443)

Diff:
---
 winsup/cygwin/dlfcn.cc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index a1e121ff333c..fdcbb511e15a 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -194,9 +194,8 @@ dlopen (const char *name, int flags)
          break;
        }
 
-      DWORD gmheflags = (flags & RTLD_NODELETE)
-                     ?  GET_MODULE_HANDLE_EX_FLAG_PIN
-                     : 0;
+      DWORD nodelete = (flags & RTLD_NODELETE) ? GET_MODULE_HANDLE_EX_FLAG_PIN
+                                              : 0;
 
       tmp_pathbuf tp; /* single one per stack frame */
       tmp_pathbuf_allocator allocator (tp);
@@ -267,7 +266,7 @@ dlopen (const char *name, int flags)
 
       if (flags & RTLD_NOLOAD)
        {
-         GetModuleHandleExW (gmheflags, wpath, (HMODULE *) &ret);
+         GetModuleHandleExW (nodelete, wpath, (HMODULE *) &ret);
          if (ret)
            break;
        }
@@ -280,15 +279,15 @@ dlopen (const char *name, int flags)
          if (d)
            {
              /* count == INT_MIN is used to specify RTLD_NODELETE */
-             if (d->count == INT_MIN || gmheflags)
+             if (d->count == INT_MIN || nodelete)
                d->count = INT_MIN;
              else
                ++d->count;
            }
        }
 
-      if (ret && gmheflags)
-       GetModuleHandleExW (gmheflags, wpath, (HMODULE *) &ret);
+      if (ret && nodelete)
+       GetModuleHandleExW (nodelete, wpath, (HMODULE *) &ret);
 
       if (!ret)
        __seterrno ();

Reply via email to