Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-01-17 00:25:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-01-17 18:32:14 +0300
commit93508e5bb841138911ed3dee3c92cc18be43d9ca (patch)
tree672ed99f55d7c0880c06e58f110b7dedc6be6772 /winsup/cygwin/fhandler
parent77680cac9404ae9e3d5ca424442129ba1e33df46 (diff)
Cygwin: open_shared: don't reuse shared_locations parameter as output
For ages, open_shared uses the shared_locations parameter as output to indicate if the mapping for a shared region has been created or just opened. Split this into two parameters. Use the shared_locations parameter as input only, return the creation state of the mapping in a bool reference parameter. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/fhandler')
-rw-r--r--winsup/cygwin/fhandler/console.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc
index ee392fda2..68ab43d81 100644
--- a/winsup/cygwin/fhandler/console.cc
+++ b/winsup/cygwin/fhandler/console.cc
@@ -211,15 +211,14 @@ beep ()
}
fhandler_console::console_state *
-fhandler_console::open_shared_console (HWND hw, HANDLE& h, bool& create)
+fhandler_console::open_shared_console (HWND hw, HANDLE& h, bool& created)
{
wchar_t namebuf[(sizeof "XXXXXXXXXXXXXXXXXX-consNNNNNNNNNN")];
__small_swprintf (namebuf, L"%S-cons%p", &cygheap->installation_key, hw);
- shared_locations m = create ? SH_SHARED_CONSOLE : SH_JUSTOPEN;
+ shared_locations m = created ? SH_SHARED_CONSOLE : SH_JUSTOPEN;
console_state *res = (console_state *)
- open_shared (namebuf, 0, h, sizeof (console_state), &m);
- create = m != SH_JUSTOPEN;
+ open_shared (namebuf, 0, h, sizeof (console_state), m, created);
return res;
}