[newlib-cygwin/main] Cygwin: dlopen: rename gmheflags to nodelete

Corinna Vinschen via Cygwin-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d9ca2c88c4dde02a23f2058833429e0e47490443

commit d9ca2c88c4dde02a23f2058833429e0e47490443
Author:     Corinna Vinschen <[email protected]>
AuthorDate: Sun Mar 30 20:47:03 2025 +0200
Commit:     Corinna Vinschen <[email protected]>
CommitDate: Sun Mar 30 20:52:34 2025 +0200

    Cygwin: dlopen: rename gmheflags to nodelete
    
    It's more helpful when reading the source.
    
    Signed-off-by: Corinna Vinschen <[email protected]>

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 ();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.