<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.os.cygwin.patches">
    <title>gmane.os.cygwin.patches</title>
    <link>http://blog.gmane.org/gmane.os.cygwin.patches</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4861"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4847"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4843"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4836"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4832"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4827"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4825"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4823"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4822"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4816"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4813"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4808"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4800"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4799"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4796"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4794"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4793"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4791"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4789"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.os.cygwin.patches/4787"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4861">
    <title>[PATCH] Export memrchr</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4861</link>
    <description>&lt;pre&gt;Here are the patches for exporting memrchr, once my patches to newlib
are accepted.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-05-09T08:18:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4847">
    <title>Regenerate configures</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4847</link>
    <description>&lt;pre&gt;cygwin/doc/configure and cygwin/testsuite/configure are now the only 
configure scripts in the winsup tree which were generated with 
autoconf-2.5x.  Any objections to regenerating them with 2.68?


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-04-23T22:17:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4843">
    <title>[PATCH] Extended mouse coordinates</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4843</link>
    <description>&lt;pre&gt;This patch replaces my previous proposal 
(http://cygwin.com/ml/cygwin-patches/2012-q2/msg00005.html) with two 
modifications:

  * Fixed a bug that suppressed mouse reporting at large coordinates (in
    all modes actually:-\ )
  * Added mouse mode 1005 (total of 3 three new modes, so all reporting
    modes run by current terminal emulators would be implemented)

I would appreciate the patch to be applied this time, planned to be my 
last mouse patch :)

Kind regards,
Thomas
2012-04-03  Thomas Wolff  &amp;lt;towo&amp;lt; at &amp;gt;towo.net&amp;gt;

* fhandler.h (class dev_console): Two flags for extended mouse modes.
* fhandler_console.cc (fhandler_console::read): Implemented 
extended mouse modes 1015 (urxvt, mintty, xterm) and 1006 (xterm).
Not implemented extended mouse mode 1005 (xterm, mintty).
Supporting mouse coordinates greater than 222 (each axis).
Also: two { wrap formatting consistency fixes.
(fhandler_console::char_command) Initialization of enhanced 
mouse reporting modes.

diff -rup sav/fhandler.h ./fhandler.h
--- sav/fhandler.h2012-04-01 19:46:04.000000000 +0200
+++ ./fhandler.h2012-04-03 15:52:07.893561600 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1282,6 +1282,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class dev_console
 
   bool insert_mode;
   int use_mouse;
+  bool ext_mouse_mode6;
+  bool ext_mouse_mode15;
   bool use_focus;
   bool raw_win32_keyboard_mode;
 
diff -rup sav/fhandler_console.cc ./fhandler_console.cc
--- sav/fhandler_console.cc2012-04-02 00:28:55.000000000 +0200
+++ ./fhandler_console.cc2012-04-03 15:56:13.993152400 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -452,12 +452,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
     {
       char c = dev_state.backspace_keycode;
       nread = 0;
-      if (control_key_state &amp;amp; ALT_PRESSED) {
-if (dev_state.metabit)
-  c |= 0x80;
-else
-  tmp[nread++] = '\e';
-      }
+      if (control_key_state &amp;amp; ALT_PRESSED)
+{
+  if (dev_state.metabit)
+    c |= 0x80;
+  else
+    tmp[nread++] = '\e';
+}
       tmp[nread++] = c;
       tmp[nread] = 0;
       toadd = tmp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -550,6 +551,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
    events at the same time. */
 int b = 0;
 char sz[32];
+char mode6_term = 'M';
 
 if (mouse_event.dwEventFlags == MOUSE_WHEELED)
   {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -573,7 +575,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
       {
 b = dev_state.last_button_code;
       }
-    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState &amp;amp;&amp;amp; !dev_state.ext_mouse_mode6)
       {
 b = 3;
 strcpy (sz, "btn up");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -594,6 +596,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 strcpy (sz, "btn3 down");
       }
 
+    if (dev_state.ext_mouse_mode6)/* distinguish release */
+      if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+        mode6_term = 'm';
+
     dev_state.last_button_code = b;
 
     if (mouse_event.dwEventFlags == MOUSE_MOVED)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -625,25 +631,46 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 b |= dev_state.nModifiers;
 
 /* We can now create the code. */
-sprintf (tmp, "\033[M%c%c%c", b + ' ', dev_state.dwMousePosition.X + ' ' + 1, dev_state.dwMousePosition.Y + ' ' + 1);
+if (dev_state.ext_mouse_mode6)
+  {
+    sprintf (tmp, "\033[&amp;lt;%d;%d;%d%c", b, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1, mode6_term);
+    nread = strlen (tmp);
+  }
+else if (dev_state.ext_mouse_mode15)
+  {
+    sprintf (tmp, "\033[%d;%d;%dM", b + 32, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1);
+    nread = strlen (tmp);
+  }
+/* else if (dev_state.ext_mouse_mode5) not implemented */
+else
+  {
+    unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
+    unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
+    if (xcode &amp;gt;= 256)
+      xcode = 0;
+    if (ycode &amp;gt;= 256)
+      ycode = 0;
+    sprintf (tmp, "\033[M%c%c%c", b + ' ', xcode, ycode);
+    nread = 6;/* tmp may contain NUL bytes */
+  }
 syscall_printf ("mouse: %s at (%d,%d)", sz, dev_state.dwMousePosition.X, dev_state.dwMousePosition.Y);
 
 toadd = tmp;
-nread = 6;
       }
   }
   break;
 
 case FOCUS_EVENT:
-  if (dev_state.use_focus) {
-    if (input_rec.Event.FocusEvent.bSetFocus)
-      sprintf (tmp, "\033[I");
-    else
-      sprintf (tmp, "\033[O");
+  if (dev_state.use_focus)
+    {
+      if (input_rec.Event.FocusEvent.bSetFocus)
+        sprintf (tmp, "\033[I");
+      else
+        sprintf (tmp, "\033[O");
 
-    toadd = tmp;
-    nread = 3;
-  }
+      toadd = tmp;
+      nread = 3;
+    }
   break;
 
 case WINDOW_BUFFER_SIZE_EVENT:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1516,22 +1543,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::char_command (char c)
 
 case 1000: /* Mouse tracking */
   dev_state.use_mouse = (c == 'h') ? 1 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1002: /* Mouse button event tracking */
   dev_state.use_mouse = (c == 'h') ? 2 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1003: /* Mouse any event tracking */
   dev_state.use_mouse = (c == 'h') ? 3 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1004: /* Focus in/out event reporting */
   dev_state.use_focus = (c == 'h') ? true : false;
-  syscall_printf ("focus reporting set to %d", dev_state.use_focus);
+  break;
+
+case 1005: /* Extended mouse mode */
+  syscall_printf ("ignored h/l command for extended mouse mode");
+  break;
+
+case 1006: /* SGR extended mouse mode */
+  dev_state.ext_mouse_mode6 = c == 'h';
+  break;
+
+case 1015: /* Urxvt extended mouse mode */
+  dev_state.ext_mouse_mode15 = c == 'h';
   break;
 
 case 2000: /* Raw keyboard mode */
&lt;/pre&gt;</description>
    <dc:creator>Thomas Wolff</dc:creator>
    <dc:date>2012-04-22T19:07:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4836">
    <title>[PATCH] Mouse reporting modes 1006 and 1015 for extended coordinates</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4836</link>
    <description>&lt;pre&gt;This patch implements mouse modes 1006 and 1015 for the cygwin console 
(no experimental add-ons this time :) ).
They enable unlimited mouse coordinate reporting like recent xterm, 
mintty, urxvt. If someone is interested, I could also implement mouse 
mode 1005.
Thomas
2012-04-03  Thomas Wolff  &amp;lt;towo&amp;lt; at &amp;gt;towo.net&amp;gt;

* fhandler.h (class dev_console): Two flags for extended mouse modes.
* fhandler_console.cc (fhandler_console::read): Implemented 
extended mouse modes 1015 (urxvt, mintty, xterm) and 1006 (xterm).
Not implemented extended mouse mode 1005 (xterm, mintty).
Supporting mouse coordinates greater than 222 (each axis).
Also: two { wrap formatting consistency fixes.
(fhandler_console::char_command) Initialization of enhanced 
mouse reporting modes.

diff -rup sav/fhandler.h ./fhandler.h
--- sav/fhandler.h2012-04-01 19:46:04.000000000 +0200
+++ ./fhandler.h2012-04-03 15:52:07.893561600 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1282,6 +1282,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class dev_console
 
   bool insert_mode;
   int use_mouse;
+  bool ext_mouse_mode6;
+  bool ext_mouse_mode15;
   bool use_focus;
   bool raw_win32_keyboard_mode;
 
diff -rup sav/fhandler_console.cc ./fhandler_console.cc
--- sav/fhandler_console.cc2012-04-02 00:28:55.000000000 +0200
+++ ./fhandler_console.cc2012-04-03 15:56:13.993152400 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -452,12 +452,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
     {
       char c = dev_state.backspace_keycode;
       nread = 0;
-      if (control_key_state &amp;amp; ALT_PRESSED) {
-if (dev_state.metabit)
-  c |= 0x80;
-else
-  tmp[nread++] = '\e';
-      }
+      if (control_key_state &amp;amp; ALT_PRESSED)
+{
+  if (dev_state.metabit)
+    c |= 0x80;
+  else
+    tmp[nread++] = '\e';
+}
       tmp[nread++] = c;
       tmp[nread] = 0;
       toadd = tmp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -550,6 +551,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
    events at the same time. */
 int b = 0;
 char sz[32];
+char mode6_term = 'M';
 
 if (mouse_event.dwEventFlags == MOUSE_WHEELED)
   {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -573,7 +575,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
       {
 b = dev_state.last_button_code;
       }
-    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState &amp;amp;&amp;amp; !dev_state.ext_mouse_mode6)
       {
 b = 3;
 strcpy (sz, "btn up");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -594,6 +596,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 strcpy (sz, "btn3 down");
       }
 
+    if (dev_state.ext_mouse_mode6)/* distinguish release */
+      if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+        mode6_term = 'm';
+
     dev_state.last_button_code = b;
 
     if (mouse_event.dwEventFlags == MOUSE_MOVED)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -625,25 +631,46 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 b |= dev_state.nModifiers;
 
 /* We can now create the code. */
-sprintf (tmp, "\033[M%c%c%c", b + ' ', dev_state.dwMousePosition.X + ' ' + 1, dev_state.dwMousePosition.Y + ' ' + 1);
+if (dev_state.ext_mouse_mode6)
+  {
+    sprintf (tmp, "\033[&amp;lt;%d;%d;%d%c", b, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1, mode6_term);
+    nread = strlen (tmp);
+  }
+else if (dev_state.ext_mouse_mode15)
+  {
+    sprintf (tmp, "\033[%d;%d;%dM", b + 32, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1);
+    nread = strlen (tmp);
+  }
+/* else if (dev_state.ext_mouse_mode5) not implemented */
+else
+  {
+    unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
+    unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
+    if (xcode &amp;gt;= 256)
+      xcode = 0;
+    if (ycode &amp;gt;= 256)
+      ycode = 0;
+    sprintf (tmp, "\033[M%c%c%c", b + ' ', xcode, ycode);
+    nread = 6;/* tmp may contain NUL bytes */
+  }
 syscall_printf ("mouse: %s at (%d,%d)", sz, dev_state.dwMousePosition.X, dev_state.dwMousePosition.Y);
 
 toadd = tmp;
-nread = 6;
       }
   }
   break;
 
 case FOCUS_EVENT:
-  if (dev_state.use_focus) {
-    if (input_rec.Event.FocusEvent.bSetFocus)
-      sprintf (tmp, "\033[I");
-    else
-      sprintf (tmp, "\033[O");
+  if (dev_state.use_focus)
+    {
+      if (input_rec.Event.FocusEvent.bSetFocus)
+        sprintf (tmp, "\033[I");
+      else
+        sprintf (tmp, "\033[O");
 
-    toadd = tmp;
-    nread = 3;
-  }
+      toadd = tmp;
+      nread = 3;
+    }
   break;
 
 case WINDOW_BUFFER_SIZE_EVENT:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1516,22 +1543,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::char_command (char c)
 
 case 1000: /* Mouse tracking */
   dev_state.use_mouse = (c == 'h') ? 1 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1002: /* Mouse button event tracking */
   dev_state.use_mouse = (c == 'h') ? 2 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1003: /* Mouse any event tracking */
   dev_state.use_mouse = (c == 'h') ? 3 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1004: /* Focus in/out event reporting */
   dev_state.use_focus = (c == 'h') ? true : false;
-  syscall_printf ("focus reporting set to %d", dev_state.use_focus);
+  break;
+
+case 1005: /* Extended mouse mode */
+  syscall_printf ("ignored h/l command for extended mouse mode");
+  break;
+
+case 1006: /* SGR extended mouse mode */
+  dev_state.ext_mouse_mode6 = c == 'h';
+  break;
+
+case 1015: /* Urxvt extended mouse mode */
+  dev_state.ext_mouse_mode15 = c == 'h';
   break;
 
 case 2000: /* Raw keyboard mode */
&lt;/pre&gt;</description>
    <dc:creator>Thomas Wolff</dc:creator>
    <dc:date>2012-04-03T19:42:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4832">
    <title>console: new mouse modes, request/response attempt</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4832</link>
    <description>&lt;pre&gt;This patch includes 2 things (to be fixed and separated anyway; change 
log still missing) for discussion:
* mouse modes 6 and 15 (numeric mouse coordinates)
* semi-fix for missing terminal status responses
The fix tries to detect the proper fhandler for CONIO, which is then 
used to queue the response.
Problem 1: I am not sure whether this detection is proper in all cases, 
what e.g. if /dev/tty is reopened etc. I don't know where else a 
relation between the handles for CONIN and CONOUT might be established.
Problem 2: While the response reaches the application with this patch, 
only the first byte is read right-away. Further bytes are delayed until 
other input is becoming present (typing a key). This may (or may not) be 
related to other issues with select(), so maybe it's worth analyzing it.

Thomas
diff -rup sav/fhandler.h ./fhandler.h
--- sav/fhandler.h2012-04-01 19:46:04.000000000 +0200
+++ ./fhandler.h2012-04-02 15:47:22.385727000 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1282,8 +1282,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class dev_console
 
   bool insert_mode;
   int use_mouse;
+  bool ext_mouse_mode6;
+  bool ext_mouse_mode15;
   bool use_focus;
   bool raw_win32_keyboard_mode;
+  fhandler_console * fh_tty;
 
   inline UINT get_console_cp ();
   DWORD con_to_str (char *d, int dlen, WCHAR w);
diff -rup sav/fhandler_console.cc ./fhandler_console.cc
--- sav/fhandler_console.cc2012-04-02 00:28:55.000000000 +0200
+++ ./fhandler_console.cc2012-04-02 18:02:26.004016200 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -139,6 +139,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::set_unit ()
   if (shared_console_info)
     {
       fh_devices this_unit = dev ();
+      if (this_unit == FH_TTY)
+dev_state.fh_tty = this;
       fh_devices shared_unit =
 (fh_devices) shared_console_info-&amp;gt;tty_min_state.getntty ();
       devset = (shared_unit == this_unit || this_unit == FH_CONSOLE
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -452,12 +454,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
     {
       char c = dev_state.backspace_keycode;
       nread = 0;
-      if (control_key_state &amp;amp; ALT_PRESSED) {
-if (dev_state.metabit)
-  c |= 0x80;
-else
-  tmp[nread++] = '\e';
-      }
+      if (control_key_state &amp;amp; ALT_PRESSED)
+{
+  if (dev_state.metabit)
+    c |= 0x80;
+  else
+    tmp[nread++] = '\e';
+}
       tmp[nread++] = c;
       tmp[nread] = 0;
       toadd = tmp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -550,6 +553,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
    events at the same time. */
 int b = 0;
 char sz[32];
+char mode6_term = 'M';
 
 if (mouse_event.dwEventFlags == MOUSE_WHEELED)
   {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -573,7 +577,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
       {
 b = dev_state.last_button_code;
       }
-    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+    else if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState &amp;amp;&amp;amp; !dev_state.ext_mouse_mode6)
       {
 b = 3;
 strcpy (sz, "btn up");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -594,6 +598,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 strcpy (sz, "btn3 down");
       }
 
+    if (dev_state.ext_mouse_mode6)/* distinguish release */
+      if (mouse_event.dwButtonState &amp;lt; dev_state.dwLastButtonState)
+        mode6_term = 'm';
+
     dev_state.last_button_code = b;
 
     if (mouse_event.dwEventFlags == MOUSE_MOVED)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -625,25 +633,46 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::read (void *pv, size_t
 b |= dev_state.nModifiers;
 
 /* We can now create the code. */
-sprintf (tmp, "\033[M%c%c%c", b + ' ', dev_state.dwMousePosition.X + ' ' + 1, dev_state.dwMousePosition.Y + ' ' + 1);
+if (dev_state.ext_mouse_mode6)
+  {
+    sprintf (tmp, "\033[&amp;lt;%d;%d;%d%c", b, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1, mode6_term);
+    nread = strlen (tmp);
+  }
+else if (dev_state.ext_mouse_mode15)
+  {
+    sprintf (tmp, "\033[%d;%d;%dM", b + 32, dev_state.dwMousePosition.X + 1, dev_state.dwMousePosition.Y + 1);
+    nread = strlen (tmp);
+  }
+/* else if (dev_state.ext_mouse_mode5) not implemented */
+else
+  {
+    unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
+    unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
+    if (xcode &amp;gt;= 256)
+      xcode = 0;
+    if (ycode &amp;gt;= 256)
+      ycode = 0;
+    sprintf (tmp, "\033[M%c%c%c", b + ' ', xcode, ycode);
+    nread = 6;/* tmp may contain NUL bytes */
+  }
 syscall_printf ("mouse: %s at (%d,%d)", sz, dev_state.dwMousePosition.X, dev_state.dwMousePosition.Y);
 
 toadd = tmp;
-nread = 6;
       }
   }
   break;
 
 case FOCUS_EVENT:
-  if (dev_state.use_focus) {
-    if (input_rec.Event.FocusEvent.bSetFocus)
-      sprintf (tmp, "\033[I");
-    else
-      sprintf (tmp, "\033[O");
+  if (dev_state.use_focus)
+    {
+      if (input_rec.Event.FocusEvent.bSetFocus)
+        sprintf (tmp, "\033[I");
+      else
+        sprintf (tmp, "\033[O");
 
-    toadd = tmp;
-    nread = 3;
-  }
+      toadd = tmp;
+      nread = 3;
+    }
   break;
 
 case WINDOW_BUFFER_SIZE_EVENT:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1516,22 +1545,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::char_command (char c)
 
 case 1000: /* Mouse tracking */
   dev_state.use_mouse = (c == 'h') ? 1 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1002: /* Mouse button event tracking */
   dev_state.use_mouse = (c == 'h') ? 2 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1003: /* Mouse any event tracking */
   dev_state.use_mouse = (c == 'h') ? 3 : 0;
-  syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
   break;
 
 case 1004: /* Focus in/out event reporting */
   dev_state.use_focus = (c == 'h') ? true : false;
-  syscall_printf ("focus reporting set to %d", dev_state.use_focus);
+  break;
+
+case 1005: /* Extended mouse mode */
+  syscall_printf ("ignored h/l command for extended mouse mode");
+  break;
+
+case 1006: /* SGR extended mouse mode */
+  dev_state.ext_mouse_mode6 = c == 'h';
+  break;
+
+case 1015: /* Urxvt extended mouse mode */
+  dev_state.ext_mouse_mode15 = c == 'h';
   break;
 
 case 2000: /* Raw keyboard mode */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1677,7 +1714,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::char_command (char c)
       /* The generated report needs to be injected for read-ahead into the
  fhandler_console object associated with standard input.
  The current call does not work. */
-      puts_readahead (buf);
+      dev_state.fh_tty-&amp;gt;puts_readahead (buf);
       break;
     case 'n':
       switch (dev_state.args_[0])
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1687,7 +1724,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_console::char_command (char c)
   y -= dev_state.info.winTop;
   /* x -= dev_state.info.winLeft;// not available yet */
   __small_sprintf (buf, "\033[%d;%dR", y + 1, x + 1);
-  puts_readahead (buf);
+  dev_state.fh_tty-&amp;gt;puts_readahead (buf);
   break;
     default:
   goto bad_escape;
&lt;/pre&gt;</description>
    <dc:creator>Thomas Wolff</dc:creator>
    <dc:date>2012-04-02T18:46:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4827">
    <title>Compiler warnings when building latest cygwin cvs with gcc-4.6 (0/2)</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4827</link>
    <description>&lt;pre&gt;Hi all

While trying to build the cygwin dll from source, I accidentally left my 
home-built gcc-4.6 in PATH... and it complains loudly about all kinds of 
things, some of which might actually be of interest. I'll follow up 
shortly with two patches that fix those problems in a backwards 
compatible way, in case this provides a improvement in code quality (and 
future-proofing for when we upgrade cygwin's gcc4).

The patched code compiles cleanly under both cygwin's gcc4 and my 
gcc-4.6.2, but the latter produces a broken cygwin1.dll. I haven't tried 
to figure out what goes wrong, since I don't know what changes went into 
cygwin's gcc4 to make it work properly in the first place. It could be 
something as simple as PATH/LD_LIBRARY_PATH...

Patch 1: fix function attribute conflicts
Patch 2: fix compiler misc. warnings

NOTE: the warnings patch applies safely, but with fuzz, if the 
attributes patch has already been applied. If you're paranoid, apply the 
warnings patch first.

Overview of changes:

1a. Conflicting function definition errors, due to functions declared 
with __attribute__((regparm(...))) and later defined without it. AFAIK, 
if both declaration and definition exist for a function, the definition 
must either give no attributes or all must match the declaration. This 
includes the __stdcall attribute...

1b. Related to #1, some member functions seem to have the wrong regparm 
number, probably somebody forgot about ``this'' when counting args. Even 
more strangely, the compiler complained about fhandler_{disk_file,tty}, 
but not fhandler_{socket,virtual}, even though the header file declares 
all as regparm(1). A similar story applies to fchown.

1c. Constructs like this:
Can be replaced by this:

2a. Several variables are set but never used. While we could silence the 
compiler by marking them unused (see below), it's probably best to just 
remove them to avoid atrophied code. I decided which to do on a 
case-by-case basis, best-effort.

2b. There's one array out of bounds warning in the pointer arithmetic 
for fhandler_disk_file.cc near line 813; after consulting ntdll.h, I'm 
pretty sure the fix below is correct.

Regards,
Ryan


&lt;/pre&gt;</description>
    <dc:creator>Ryan Johnson</dc:creator>
    <dc:date>2012-03-29T14:36:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4825">
    <title>[PATCH] Ctrl-C and non-Cygwin programs</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4825</link>
    <description>&lt;pre&gt;This is a proof of concept demonstration which
makes Ctrl-C behave in a way a lot of people expect
concerning non-Cygwin console programs.

What it does actually is it generates CTRL_BREAK_EVENT with 
Windows Console API GenerateConsoleCtrlEvent on the arrival of SIGINT.
And to make this scheme to be functional it is required to specify
CREATE_NEW_PROCESS_GROUP when creating new non-Cygwin processes.

To my surprise there seem to be no way to generate CTRL_C_EVENT using API.

I must also point out that virtually all of the terminal emulators
are sneakily keeping hidden Windows Console in the background.
Thus several features of the Windows Console is still available to
processes running in the cygwin environment.
One of such features is this 'process group' and the other one is
'code page' which you manipulate with chcp.com utility.


Following is a bunch of random posts, I picked up from this list, 
talking about the same topic. Ordered by its significance under my judge.
These should help you understand (or remind) what it is about.


Date: Mon, 04 Dec 2006 06:24:41 -0800
Subject: Re: Ctrl-C and non-cygwin programs
http://cygwin.com/ml/cygwin/2006-12/msg00151.html

Date: Thu, 20 May 2010 22:50:49 +0000 (UTC)
Subject: A workaround for CTRL-C not working on Windows console apps in ptys
http://sourceware.org/ml/cygwin/2010-05/msg00524.html

Date: Mon, 19 Jan 2009 11:41:51 -0500
Subject: Signal handling in WIN32 console programs
http://sourceware.org/ml/cygwin/2009-01/msg00587.html

Date: Fri, 24 Aug 2001 17:25:14 -0400
Subject: control-c issue when running VC++ console programs in bash.exe
http://cygwin.com/ml/cygwin/2001-08/msg01111.html


As you can see this is a haunting problem and
the situation hasn't changed a bit over this past decade.
At least please let this issue be added to the FAQ.

I believe this patch is fairly small and worth giving a field test.


Lastly first third of the patch is a workaround of a problem observed
with cygwin1.dll of cvs HEAD.
To reproduce:
1. Launch a terminal emulator like rxvt or mintty.
2. Execute cmd.exe or more.com from shell prompt.
3. Type in Enter, Ctrl-C, then Enter again.
Whole processes including the terminal emulator will just hung up.

---
ChangeLog for winsup/cygwin:

2012-03-28  Ein Terakawa &amp;lt;applause&amp;lt; at &amp;gt;elfmimi.jp&amp;gt;

* exceptions.cc: (sigpacket::process) Do not sigflush in response
to SIGINT for a non-Cygwin process to work around hung-up.
Translate SIGINT into CTRL_BREAK_EVENT for a non-Cygwin process.
* spawn.cc: (child_info_spawn::worker) CREATE_NEW_PROCESS_GROUP for
each new non-Cygwin process.
---
Index: winsup/cygwin/exceptions.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/exceptions.cc,v
retrieving revision 1.375
diff -c -p -r1.375 exceptions.cc
*** winsup/cygwin/exceptions.cc12 Feb 2012 22:43:33 -00001.375
--- winsup/cygwin/exceptions.cc28 Mar 2012 14:39:58 -0000
*************** sigpacket::process ()
*** 1166,1171 ****
--- 1166,1174 ----
    switch (si.si_signo)
      {
      case SIGINT:
+       if (have_execed)
+         break;
+       /* fall through */
      case SIGQUIT:
      case SIGSTOP:
      case SIGTSTP:
*************** sigpacket::process ()
*** 1252,1257 ****
--- 1255,1266 ----
        if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
  goto stop;
  
+       if (si.si_signo == SIGINT &amp;amp;&amp;amp; have_execed)
+         {
+           GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, GetProcessId(ch_spawn));
+           goto done;
+         }
+ 
        goto exit_sig;
      }
  
Index: winsup/cygwin/spawn.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/spawn.cc,v
retrieving revision 1.329
diff -c -p -r1.329 spawn.cc
*** winsup/cygwin/spawn.cc21 Mar 2012 15:54:50 -00001.329
--- winsup/cygwin/spawn.cc28 Mar 2012 14:39:58 -0000
*************** child_info_spawn::worker (const char *pr
*** 573,579 ****
    cygbench ("spawn-worker");
  
    if (!real_path.iscygexec())
!     ::cygheap-&amp;gt;fdtab.set_file_pointers_for_exec ();
  
    moreinfo-&amp;gt;envp = build_env (envp, envblock, moreinfo-&amp;gt;envc,
        real_path.iscygexec ());
--- 573,582 ----
    cygbench ("spawn-worker");
  
    if (!real_path.iscygexec())
!     {
!       ::cygheap-&amp;gt;fdtab.set_file_pointers_for_exec ();
!       c_flags |= CREATE_NEW_PROCESS_GROUP;
!     }
  
    moreinfo-&amp;gt;envp = build_env (envp, envblock, moreinfo-&amp;gt;envc,
        real_path.iscygexec ());


&lt;/pre&gt;</description>
    <dc:creator>Ein Terakawa</dc:creator>
    <dc:date>2012-03-29T02:55:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4823">
    <title>[PATCH] Fix possible infinite loop in hires_ms::timeGetTime_ns()</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4823</link>
    <description>&lt;pre&gt;ntdll.h:SharedUserData misses a volatile qualifier. This (at least) may 
result in an infinite loop in hires_ms::timeGetTime_ns(). Fortunately 
this could only happen if LowPart wraps around during the function call.

Generated code:

$ objdump -d -C times.o
...
1160 &amp;lt;hires_ms::timeGetTime_ns()&amp;gt;:
1160: 55                 push   %ebp
1161: 8b 15 0c 00 fe 7f  mov    0x7ffe000c,%edx
1167: 3b 15 10 00 fe 7f  cmp    0x7ffe0010,%edx
116d: 89 e5              mov    %esp,%ebp
116f: a1 08 00 fe 7f     mov    0x7ffe0008,%eax
1174: 75 02              jne    1178 &amp;lt;hires_ms::timeGetTime_ns()+0x18&amp;gt;
1176: 5d                 pop    %ebp
1177: c3                 ret
1178: eb fe              jmp    1178 &amp;lt;hires_ms::timeGetTime_ns()+0x18&amp;gt;
...


This function results in the same code:

LONGLONG hires_ms::timeGetTime_ns ()
{
   LARGE_INTEGER t;
   t.HighPart = SharedUserData.InterruptTime.High1Time;
   t.LowPart = SharedUserData.InterruptTime.LowPart;
   if (t.HighPart == SharedUserData.InterruptTime.High2Time)
     return t.QuadPart;

   for (;;)
     ;
}


Christian

&lt;/pre&gt;</description>
    <dc:creator>Christian Franke</dc:creator>
    <dc:date>2012-03-20T17:48:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4822">
    <title>1.7.10/1.7.11: .Net programs started from a cygwin console may fail.</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4822</link>
    <description>&lt;pre&gt;http://cygwin.com/ml/cygwin/2012-03/msg00375.html

I am seeing a very similar bug after upgrading.   I see reference to a "test" patch. I am willing to test the update. How can I get a copy?

Greg





&lt;/pre&gt;</description>
    <dc:creator>Greg Gudenburr</dc:creator>
    <dc:date>2012-03-17T13:53:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4816">
    <title>avoid calling strlen() twice in readlink()</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4816</link>
    <description>&lt;pre&gt;Hi.

Here is a tiny patch to avoid calling strlen() twice in readlink().

ChangeLog:

2012-03-08  Václav Zeman  &amp;lt;vhaisman&amp;lt; at &amp;gt;gmail.com&amp;gt;

        * path.cc (readlink): Avoid calling strlen() twice.

&lt;/pre&gt;</description>
    <dc:creator>Václav Zeman</dc:creator>
    <dc:date>2012-03-08T13:37:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4813">
    <title>Changing MAXPATHLEN in glob.cc back to 16384</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4813</link>
    <description>&lt;pre&gt;Hi,

Revision 1.7 of src/winsup/cygwin/glob.cc reduced maximum allowed path length from 16384 to 4096 characters. This is unfortunate because some paths used in my build system can reach 6k characters in length. Attached patch reinstates 16384 characters limit.

&lt;/pre&gt;</description>
    <dc:creator>Piotr Foltyn</dc:creator>
    <dc:date>2012-03-06T17:06:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4808">
    <title>fix tcgetsid return type</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4808</link>
    <description>&lt;pre&gt;Detected by gnulib's unit tests.  POSIX requires tcgetsid to return
pid_t, not int.

2012-02-27  Eric Blake  &amp;lt;eblake&amp;lt; at &amp;gt;redhat.com&amp;gt;

* include/sys/termios.h (tcgetsid): Fix return type.
* termios.cc (tcgetsid): Likewise.
* fhandler_termios.cc (fhandler_termios::tcgetsid): Likewise.
* fhandler.h (fhandler_base): Likewise.
* fhandler.cc (fhandler_base::tcgetsid): Likewise.

diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index ef25a07..c3bca4f 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1464,7 +1464,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_base::tcgetpgrp ()
   return -1;
 }

-int
+pid_t
 fhandler_base::tcgetsid ()
 {
   set_errno (ENOTTY);
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 605f59b..3b186bd 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -383,7 +383,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public:
   virtual int tcgetattr (struct termios *t);
   virtual int tcsetpgrp (const pid_t pid);
   virtual int tcgetpgrp ();
-  virtual int tcgetsid ();
+  virtual pid_t tcgetsid ();
   virtual bool is_tty () const { return false; }
   virtual bool ispipe () const { return false; }
   virtual pid_t get_popen_pid () const {return 0;}
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1155,7 +1155,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class fhandler_termios: public fhandler_base
   virtual void __release_output_mutex (const char *fn, int ln) {}
   void echo_erase (int force = 0);
   virtual _off64_t lseek (_off64_t, int);
-  int tcgetsid ();
+  pid_t tcgetsid ();

   fhandler_termios (void *) {}

diff --git a/winsup/cygwin/fhandler_termios.cc
b/winsup/cygwin/fhandler_termios.cc
index c218fde..36017dc 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,7 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* fhandler_termios.cc

    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
-   2010, 2011 Red Hat, Inc.
+   2010, 2011, 2012 Red Hat, Inc.

 This file is part of Cygwin.

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -401,7 +401,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fhandler_termios::sigflush ()
     tcflush (TCIFLUSH);
 }

-int
+pid_t
 fhandler_termios::tcgetsid ()
 {
   if (myself-&amp;gt;ctty != -1 &amp;amp;&amp;amp; myself-&amp;gt;ctty == tc ()-&amp;gt;ntty)
diff --git a/winsup/cygwin/include/sys/termios.h
b/winsup/cygwin/include/sys/termios.h
index a0d1b24..a87f9de 100644
--- a/winsup/cygwin/include/sys/termios.h
+++ b/winsup/cygwin/include/sys/termios.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,7 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* sys/termios.h

    Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
-   2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+   2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.

 This file is part of Cygwin.

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,6 +14,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; details. */
 #ifndef_SYS_TERMIOS_H
 #define _SYS_TERMIOS_H

+#include &amp;lt;sys/types.h&amp;gt;
+
 #defineTIOCMGET0x5415
 #defineTIOCMBIS0x5416
 #defineTIOCMBIC0x5417
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -328,7 +330,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int tcsendbreak (int, int);
 int tcdrain (int);
 int tcflush (int, int);
 int tcflow (int, int);
-int tcgetsid (int);
+pid_t tcgetsid (int);
 void cfmakeraw (struct termios *);
 speed_t cfgetispeed(const struct termios *);
 speed_t cfgetospeed(const struct termios *);
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index 3096513..0fb0de2 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,7 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* termios.cc: termios for WIN32.

    Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+   2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.

    Written by Doug Evans and Steve Chamberlain of Cygnus Support
    dje&amp;lt; at &amp;gt;cygnus.com, sac&amp;lt; at &amp;gt;cygnus.com
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -207,7 +207,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tcgetpgrp (int fd)
   return res;
 }

-extern "C" int
+extern "C" pid_t
 tcgetsid (int fd)
 {
   int res;

&lt;/pre&gt;</description>
    <dc:creator>Eric Blake</dc:creator>
    <dc:date>2012-02-27T23:25:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4800">
    <title>[PATCH] Add pldd(1)</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4800</link>
    <description>&lt;pre&gt;The pldd(1) command apparently originates from Solaris and was added to
glibc-2.15[1].  Patches and new file attached.


Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-02-24T08:38:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4799">
    <title>[PATCH] Add pthread_getname_np, pthread_setname_np</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4799</link>
    <description>&lt;pre&gt;This patchset adds pthread_getname_np and pthread_setname_np.  These
were added to glibc in 2.12[1] and are also present in some form on
NetBSD and several UNIXes.  IIUC recent versions of GDB can benefit from
this support.

The code is based on NetBSD's implementation with changes to better
match Linux behaviour.  It does differ from Linux in two points:

* The thread name is not affected by changing __progname (or
program_invocation_short_name on Linux).  I used the latter because it
is cheaper than the pinfo-&amp;gt;progname dance (e.g. in
format_process_stat()).

* pthread_setname_np(thr, NULL) segfaults on Linux (and NetBSD), but our
snprintf is apparently more robust and treats it as an empty string.

I'll leave it up to you to decide if either of these matter.

I implemented this via class pthread_attr to make it easier to add
pthread_attr_[gs]etname_np (present in NetBSD and some UNIXes) should it
ever be added to Linux (or we decide we want it anyway).

Patches and test code attached.


Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS
&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-02-24T03:38:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4796">
    <title>[PATCH] Add scandirat(3)</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4796</link>
    <description>&lt;pre&gt;scandirat(3) was added in glibc-2.15[1] and has supposedly been proposed
for addition to POSIX.1[2].  Patch attached.


Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
[2] http://article.gmane.org/gmane.linux.man/2419

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-02-21T22:44:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4794">
    <title>[PATCH] pthread.h: include &lt;time.h&gt;</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4794</link>
    <description>&lt;pre&gt;POSIX states:

The reason being that some pthread functions take a clockid_t argument,
and the CLOCK_* symbolic names are therein defined.

Patch attached.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-02-12T22:04:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4793">
    <title>[PATCH] Fix C++ compilation of wait(NULL)</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4793</link>
    <description>&lt;pre&gt;This fixes the regression I introduced in sys/wait.h.

Sorry, and thanks for the bug report.

Christian

&lt;/pre&gt;</description>
    <dc:creator>Christian Franke</dc:creator>
    <dc:date>2012-02-08T18:39:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4791">
    <title>[PATCH] ldd: support .oct and .so modules</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4791</link>
    <description>&lt;pre&gt;Octave modules use the .oct extension, and several programs use .so for
modules even on Cygwin (e.g. Apache2, Mesa, OpenSSL, Ruby).  Currently,
running ldd(1) on any of these returns ENOEXEC.

The attached patch fixes ldd to treat these as DLLs and show their
runtime dependencies.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-01-24T05:53:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4789">
    <title>[PATCH] doc: document printf %m</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4789</link>
    <description>&lt;pre&gt;New feature just added to newlib.  Patch for winsup/doc attached.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-01-13T09:26:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4787">
    <title>[PATCH] doc: tgmath.h</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4787</link>
    <description>&lt;pre&gt;New header just committed to newlib.  Patch attached.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-01-12T11:28:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.os.cygwin.patches/4781">
    <title>[PATCH] Add pthread_sigqueue(3)</title>
    <link>http://comments.gmane.org/gmane.os.cygwin.patches/4781</link>
    <description>&lt;pre&gt;This patchset adds pthread_sigqueue(3), a GNU extension:

http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_sigqueue.3.html

The implementation is based on the existing sigqueue(2) and
pthread_kill(3) code.

Patches for winsup/cygwin and winsup/doc attached.


Yaakov

&lt;/pre&gt;</description>
    <dc:creator>Yaakov (Cygwin/X</dc:creator>
    <dc:date>2012-01-01T18:59:00</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.os.cygwin.patches">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.os.cygwin.patches</link>
  </textinput>
</rdf:RDF>

