1- From d9b4e1decb9999a9e1577eafeea8ae337d44924b Mon Sep 17 00:00:00 2001
1+ From 50d9d80db4a6a941a03d99d82afb760c4ab4101f Mon Sep 17 00:00:00 2001
22From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
33 =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <
[email protected] >
44Date: Sun, 14 Apr 2019 21:09:17 +0300
5- Subject: [PATCH 03 /N] Rename dll from cygwin to msys
5+ Subject: [PATCH 02 /N] Rename dll from cygwin to msys
66
77---
88 winsup/cygserver/transport_pipes.h | 4 +++
@@ -16,7 +16,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
1616 winsup/cygwin/dtable.cc | 6 +++++
1717 winsup/cygwin/exceptions.cc | 4 +--
1818 winsup/cygwin/fhandler/pipe.cc | 4 +++
19- winsup/cygwin/fhandler/pty.cc | 20 ++++++++++++++
19+ winsup/cygwin/fhandler/pty.cc | 26 ++++ ++++++++++++++
2020 winsup/cygwin/hookapi.cc | 4 +++
2121 winsup/cygwin/include/cygwin/cygwin_dll.h | 10 +++----
2222 winsup/cygwin/include/cygwin/version.h | 8 ++++++
@@ -38,7 +38,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
3838 winsup/utils/mingw/strace.cc | 9 +++----
3939 winsup/utils/path.cc | 12 ++++-----
4040 winsup/utils/ssp.c | 8 +++---
41- 33 files changed, 174 insertions(+), 72 deletions(-)
41+ 33 files changed, 180 insertions(+), 72 deletions(-)
4242
4343diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h
4444index e101623..66272bc 100644
@@ -57,7 +57,7 @@ index e101623..66272bc 100644
5757
5858 /* Named pipes based transport, for security on NT */
5959diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
60- index d47a1a2..c1f9921 100644
60+ index 383f4f3..981877d 100644
6161--- a/winsup/cygwin/Makefile.am
6262+++ b/winsup/cygwin/Makefile.am
6363@@ -37,12 +37,12 @@ newlib_build=$(target_builddir)/newlib
@@ -78,7 +78,7 @@ index d47a1a2..c1f9921 100644
7878
7979 #
8080 # sources
81- @@ -587 ,16 +587 ,16 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
81+ @@ -589 ,16 +589 ,16 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
8282 $(LIBSERVER):
8383 $(MAKE) -C $(cygserver_blddir) libcygserver.a
8484
@@ -98,7 +98,7 @@ index d47a1a2..c1f9921 100644
9898 # Set PE and export table header timestamps to zero for reproducible builds.
9999 $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
100100 $(newlib_build)/libm.a $(newlib_build)/libc.a
101- @@ -605 ,18 +605 ,18 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
101+ @@ -607 ,18 +607 ,18 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
102102 -Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) \
103103 -Wl,--dynamicbase -static \
104104 $${SOURCE_DATE_EPOCH:+-Wl,--no-insert-timestamp} \
@@ -120,7 +120,7 @@ index d47a1a2..c1f9921 100644
120120 toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@
121121
122122 $(DEF_FILE): scripts/gendef cygwin.din
123- @@ -629 ,13 +629 ,14 @@ sigfe.s: $(DEF_FILE) tlsoffsets
123+ @@ -631 ,13 +631 ,14 @@ sigfe.s: $(DEF_FILE) tlsoffsets
124124
125125 LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES)))
126126 $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME)
@@ -136,7 +136,7 @@ index d47a1a2..c1f9921 100644
136136 --exclude='(?i:dll)' \
137137 --exclude='reloc' \
138138 --exclude='^main$$' \
139- @@ -685 ,7 +686 ,7 @@ all-local: $(LIB_NAME) $(SUBLIBS)
139+ @@ -687 ,7 +688 ,7 @@ all-local: $(LIB_NAME) $(SUBLIBS)
140140 clean-local:
141141 -rm -f $(BUILT_SOURCES)
142142 -rm -f $(DEF_FILE) sigfe.s
@@ -223,10 +223,10 @@ index f4c09be..e19b7d3 100644
223223 static int _fmode;
224224
225225diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
226- index 9b6bb55..2d0bae5 100644
226+ index e06616d..40d99dd 100644
227227--- a/winsup/cygwin/dlfcn.cc
228228+++ b/winsup/cygwin/dlfcn.cc
229- @@ -147 ,8 +147 ,13 @@ collect_basenames (pathfinder::basenamelist & basenames,
229+ @@ -148 ,8 +148 ,13 @@ collect_basenames (pathfinder::basenamelist & basenames,
230230 /* If the basename starts with "lib", ... */
231231 if (!strncmp (basename, "lib", 3))
232232 {
@@ -277,7 +277,7 @@ index 7303f7e..6ccc19a 100644
277277 w32len = cygheap->installation_key.Length / sizeof (WCHAR);
278278 if (w32len
279279diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
280- index 876b79e..466abdd 100644
280+ index f79978f..e724e37 100644
281281--- a/winsup/cygwin/exceptions.cc
282282+++ b/winsup/cygwin/exceptions.cc
283283@@ -528,14 +528,14 @@ int exec_prepared_command (PWCHAR command)
@@ -298,10 +298,10 @@ index 876b79e..466abdd 100644
298298 break;
299299 }
300300diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc
301- index e35d523..506dd09 100644
301+ index 2ff5dfa..11ef78c 100644
302302--- a/winsup/cygwin/fhandler/pipe.cc
303303+++ b/winsup/cygwin/fhandler/pipe.cc
304- @@ -790 ,7 +790 ,11 @@ fhandler_pipe::close (int flag)
304+ @@ -798 ,7 +798 ,11 @@ fhandler_pipe::close (int flag)
305305 return ret;
306306 }
307307
@@ -314,10 +314,10 @@ index e35d523..506dd09 100644
314314 /* Create a pipe, and return handles to the read and write ends,
315315 just like CreatePipe, but ensure that the write end permits
316316diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc
317- index 3128b92..0969b2f 100644
317+ index 36fddbb..8154fcc 100644
318318--- a/winsup/cygwin/fhandler/pty.cc
319319+++ b/winsup/cygwin/fhandler/pty.cc
320- @@ -875 ,7 +875 ,11 @@ fhandler_pty_slave::open (int flags, mode_t)
320+ @@ -882 ,7 +882 ,11 @@ fhandler_pty_slave::open (int flags, mode_t)
321321 pipe_reply repl;
322322 DWORD len;
323323
@@ -329,7 +329,7 @@ index 3128b92..0969b2f 100644
329329 &cygheap->installation_key, get_minor ());
330330 termios_printf ("dup handles via master control pipe %s", buf);
331331 if (!CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl,
332- @@ -1137 ,7 +1141 ,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void)
332+ @@ -1144 ,7 +1148 ,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void)
333333 {
334334 char pipe[MAX_PATH];
335335 __small_sprintf (pipe,
@@ -339,9 +339,25 @@ index 3128b92..0969b2f 100644
339339 "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
340340+ #endif
341341 &cygheap->installation_key, get_minor ());
342- pipe_request req = { GetCurrentProcessId () };
342+ pipe_request req = { GET_HANDLES, GetCurrentProcessId () };
343343 pipe_reply repl;
344- @@ -2024,7 +2032,11 @@ fhandler_pty_master::close (int flag)
344+ @@ -1605,9 +1613,15 @@ fhandler_pty_slave::tcflush (int queue)
345+ if (queue == TCIFLUSH || queue == TCIOFLUSH)
346+ {
347+ char pipe[MAX_PATH];
348+ + #ifdef __MSYS__
349+ + __small_sprintf (pipe,
350+ + "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
351+ + &cygheap->installation_key, get_minor ());
352+ + #else
353+ __small_sprintf (pipe,
354+ "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
355+ &cygheap->installation_key, get_minor ());
356+ + #endif
357+ pipe_request req = { FLUSH_INPUT, GetCurrentProcessId () };
358+ pipe_reply repl;
359+ DWORD n;
360+ @@ -2039,7 +2053,11 @@ fhandler_pty_master::close (int flag)
345361 pipe_reply repl;
346362 DWORD len;
347363
@@ -353,7 +369,7 @@ index 3128b92..0969b2f 100644
353369 &cygheap->installation_key, get_minor ());
354370 acquire_output_mutex (mutex_timeout);
355371 if (master_ctl)
356- @@ -2930 ,7 +2942 ,11 @@ fhandler_pty_master::setup ()
372+ @@ -2950 ,7 +2968 ,11 @@ fhandler_pty_master::setup ()
357373
358374 /* Create master control pipe which allows the master to duplicate
359375 the pty pipe handles to processes which deserve it. */
@@ -365,7 +381,7 @@ index 3128b92..0969b2f 100644
365381 &cygheap->installation_key, unit);
366382 master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX
367383 | FILE_FLAG_FIRST_PIPE_INSTANCE,
368- @@ -3819 ,7 +3835 ,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
384+ @@ -3840 ,7 +3862 ,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
369385 {
370386 char pipe[MAX_PATH];
371387 __small_sprintf (pipe,
@@ -375,7 +391,7 @@ index 3128b92..0969b2f 100644
375391 "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
376392+ #endif
377393 &cygheap->installation_key, ttyp->get_minor ());
378- pipe_request req = { GetCurrentProcessId () };
394+ pipe_request req = { GET_HANDLES, GetCurrentProcessId () };
379395 pipe_reply repl;
380396diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
381397index ee2edba..9f31a71 100644
@@ -436,7 +452,7 @@ index 1e4cf98..b77598b 100644
436452 } \
437453 } \
438454diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
439- index 961a98c..aafb811 100644
455+ index 89c1e1f..b85e8c3 100644
440456--- a/winsup/cygwin/include/cygwin/version.h
441457+++ b/winsup/cygwin/include/cygwin/version.h
442458@@ -510,7 +510,11 @@ details. */
0 commit comments