Corinna Vinschen | 24 Oct 14:25 2012

[Fwd: Re: Fwd: Re: [patch]: Decouple cygwin building from in-tree mingw/w32api building]

FYI.

----- Forwarded message from Earnie Boyd <...> -----

> Date: Wed, 24 Oct 2012 07:15:52 -0400
> From: Earnie Boyd <...>
> To: Keith Marshall <...>, Christopher Faylor
> 	<...>, cygwin-patches <at> cygwin.com, Corinna Vinschen
> 	<...>
> Subject: Re: Fwd: Re: [patch]: Decouple cygwin building from in-tree
> 	mingw/w32api building
> 
> On Wed, Oct 24, 2012 at 3:49 AM, Corinna Vinschen wrote:
> >
> > Just to be sure:  Does that mean we can simply remove the mingw and
> > w32api dirs in the sourceware repo any time?
> 
> Yes.
> 
> -- 
> Earnie
> -- https://sites.google.com/site/earnieboyd

----- End forwarded message -----

Kai Tietz | 24 Oct 11:16 2012

[patch cygwin]: Replace inline-assembler in string.h by C implementation

Hello,

this patch replaces the inline-assember used in string.h by C implementation.
There are three reasons why I want to suggest this.  First, the C-code might
be optimized further by fixed (constant) arguments.  Secondly, it is
architecture
independent and so we just need to maintain on code-path.  And as
third point, by
inspecting generated assembly code produced by compiler out of C code
vs. inline-assembler
it shows that compiler produces better code.  It handles
jump-threading better, and also
improves average executed instructions.

ChangeLog

2012-10-24  Kai Tietz

	* string.h (strechr): Replace assembler by
	C code.
	(ascii_strcasematch): Likewise.
	(ascii_strncasematch): Likwise.

Ok for apply?

Regards,
Kai

Index: string.h
===================================================================
(Continue reading)

Corinna Vinschen | 24 Oct 09:49 2012
Picon

Re: Fwd: Re: [patch]: Decouple cygwin building from in-tree mingw/w32api building

On Oct 23 17:48, Christopher Faylor wrote:
> On Tue, Oct 23, 2012 at 09:50:10PM +0100, Keith Marshall wrote:
> >And just like Earnie's, the response he requested from me also bounced.
> >Forwarded copy below:
> 
> >-------- Original Message --------
> >Subject: Re: [patch]: Decouple cygwin building from in-tree mingw/w32api 
> >building
> >Date: Tue, 23 Oct 2012 21:41:07 +0100
> >From: Keith Marshall <...>
> >Organization: MinGW Project
> >To: Earnie Boyd <...>
> >CC: cygwin-patches<...>
> >
> >On 22/10/12 12:14, Earnie Boyd wrote:
> >> On Mon, Oct 22, 2012 at 12:09 AM, Christopher Faylor wrote:
> >>>Earnie, we seem to be transitioning from the need to have a
> >>>mingw/w32api in the source tree.  What do you think about removing
> >>>these directories from the depot and moving repo to sourceforge, or
> >>>some other place?
> >>
> >>In anticipation of this event I've already copied the source.  I would
> >>like to leave the code in winsup until the end of the year if that
> >>timeline is fine with Keith.
> >
> >Fine by me; I also have my Mercurial clones of both repositories, from
> >the time when we abandoned them in favour of our own git repository on
> >SourceForge.
> >
> >>>You've got a home for as long as you like on sourceware.org but I was
(Continue reading)

Kai Tietz | 18 Oct 17:57 2012

Re: [patch]: Decouple cygwin building from in-tree mingw/w32api building

Hi Corinna,

2012/10/18 Corinna Vinschen:
> Hi Yaakov,
>
> On Oct 18 02:33, Yaakov (Cygwin/X) wrote:
>> On Wed, 2012-10-17 at 15:32 -0400, Christopher Faylor wrote:
>>> But, anyway, nevermind.  This shouldn't be a requirement for getting
>>> these changes checked in.  I'm more concerned with just nuking the
>>> now-unneeded mingw script.
>>
>> Draft patch attached, based partially on Kai's.  Yes, it needs a
>> ChangeLog entry, but it also needs more testing first.
>>
>> On Cygwin, you need either mingw-gcc-g++ and mingw-zlib, or
>> mingw64-i686-gcc-g++ with Ports' mingw64-i686-zlib, available here:
>
> Any problem to move mingw64-i686-zlib into the distro?

Hmm, wouldn't assume so.  I can give JonY a ping for that.  I assume
he would provide such a package.  Shall I ask him?

>> ftp://ftp.cygwinports.org/pub/cygwinports/release-2/CrossDevel/mingw64-i686-zlib/
>>
>> On Fedora, you need my cygwin-gcc-c++ plus mingw32-gcc-c++ and
>> mingw32-zlib-static.  Unfortunately F17's mingw32-headers isn't
>> (aren't?) new enough, so two files in winsup/utils wouldn't compile
>
> Indeed, unfortunately.  The Fedora maintainer cut the latest version
> right before I started to apply my changes to mingw64.
(Continue reading)

Kai Tietz | 17 Oct 18:13 2012

[patch]: Decouple cygwin building from in-tree mingw/w32api building

Hello everybody,

This patch modifies the bits of build-process so that cygwin and mingw
building is decoupled from each other.
Additionally the patch decouples cygwin's build from the w32api of mingw.org.
By this change it is now possible to build cygwin (and utilities) with
mingw.org's and mingw-w64's psdk and compilers.  Later are necessary
to build cygwin's native utils, which have not to depend on
cygwin1.dll.
These changes are also necessary for having 64-bit build support in
future. By this reason the mingw-script in utils/ had to learn about
the host's architecture and about how to search for an installed
mingw-toolchain for given architecture.  As Corinna told me that
cygwin wants to use in question the -w64- mingw-environment, this
script is searching first for -w64- based toolchain.  On second
attempt it searches for any mingw triplet for given architecture.

ChangeLog winsup/

2012-10-17  Kai Tietz

	* Makefile.common: Remove w32api specific internal
	configure.
	(nostdincxx): Always turn off default libraries.
	* Makefile.in: Remove for cygwin build dependencies
	to w32api and mingw.
	* configure.in: Make test for w32api directory optional.

ChangeLog lsaauth/

(Continue reading)

Jin-woo Ye | 26 Aug 03:59 2012
Picon

[PATCH] suggestion for faster pseudo-reloc.

This patch fixes the problem making pseudo-reloc too slow when there is 
many pseudo-reloc entries in rdata section by deciding when not to call 
Virtual{Query,Protect} to save overhead.
I tested this patch and time taken for pseudo-reloc reduced 1800ms to 
16ms for 3682 entries.
Please review this patch.
-- 
Regards.

2012-08-26  <jojelino <at> gmail.com>

	* pseudo-reloc.cc (auto_protect_for): Define.
	(__write_memory): Use auto_protect_for, add verbose message displaying the number of items.
	(_pei386_runtime_relocator):Add verbose message displaying time taken for pseudo-reloc.
Index: winsup/cygwin/pseudo-reloc.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/pseudo-reloc.cc,v
retrieving revision 1.10
diff -u -p -r1.10 pseudo-reloc.cc
--- winsup/cygwin/pseudo-reloc.cc	16 Aug 2012 23:34:44 -0000	1.10
+++ winsup/cygwin/pseudo-reloc.cc	26 Aug 2012 01:47:13 -0000
 <at>  <at>  -125,7 +125,78  <at>  <at>  __report_error (const char *msg, ...)
   abort ();
 #endif
 }
-
+/**
+ * This function automatically sets addr as PAGE_EXECUTE_READWRITE
(Continue reading)

Jon TURNEY | 23 Aug 18:04 2012
Picon

[PATCH] Add pointer to instructions for uninstalling cygwin LSA to uninstall FAQ


The uninstall instructions in the FAQ will fail if cygwin LSA is installed.

2012-08-23  Jon TURNEY  <jon.turney <at> dronecode.org.uk>

	* faq-setup.xml (faq.setup.uninstall-all): Add pointer to instructions
	for uninstalling cyglsa.
Index: doc/faq-setup.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/faq-setup.xml,v
retrieving revision 1.28
diff -u -p -r1.28 faq-setup.xml
--- doc/faq-setup.xml	5 Jan 2011 16:02:00 -0000	1.28
+++ doc/faq-setup.xml	23 Aug 2012 15:33:52 -0000
 <at>  <at>  -450,6 +450,11  <at>  <at>  well.
 of Cygwin is as follows:
 </para>
 <orderedlist>
+<listitem><para>
+If you installed Cygwin LSA authentication using the <literal>cyglsa-config</literal>
+script, follow the instructions in <ulink
url="http://cygwin.com/ml/cygwin/2011-10/msg00113.html" />.
+</para>
+</listitem>
 <listitem><para>If you have any Cygwin services running, remove by repeating 
 the instructions in <ulink
 url="http://cygwin.com/faq/faq.setup.html#faq.setup.uninstall-service" /> for
(Continue reading)

Thomas Wolff | 16 Aug 08:33 2012
Picon

console: terminal request/response

This is another patch to enable terminal responses in the cygwin console.
Typically, terminals respond to requests to report Primary/Secondary 
Device Attributes
and to send a Cursor Position Report (see 
http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt).
(This hasn't ever worked in the cygwin console except with obsolete 
setting CYGWIN=tty.)

My attached patch should now fix this. I know it's not really 
significant anymore
(http://cygwin.com/ml/cygwin-patches/2012-q2/msg00002.html) but I 
couldn't resist
to rework and fix my previous fix attempts.

Thomas
diff -rup sav/fhandler.h ./fhandler.h
--- sav/fhandler.h	2012-08-03 17:39:21.000000000 +0200
+++ ./fhandler.h	2012-08-15 16:57:09.152522000 +0200
 <at>  <at>  -1294,6 +1294,8  <at>  <at>  class dev_console
   bool ext_mouse_mode15;
   bool use_focus;
   bool raw_win32_keyboard_mode;
+  char cons_rabuf[40];
+  char * cons_rapoi;

   inline UINT get_console_cp ();
   DWORD con_to_str (char *d, int dlen, WCHAR w);
 <at>  <at>  -1384,6 +1386,7  <at>  <at>  private:
(Continue reading)

Thomas Wolff | 14 Aug 22:56 2012
Picon

/dev/clipboard pasting with small read() buffer


--- sav/fhandler_clipboard.cc	2012-07-08 02:36:47.000000000 +0200
+++ ./fhandler_clipboard.cc	2012-08-14 18:25:14.903255600 +0200
 <at>  <at>  -222,6 +222,7  <at>  <at>  fhandler_dev_clipboard::read (void *ptr,
   UINT formatlist[2];
   int format;
   LPVOID cb_data;
+  int rach;

   if (!OpenClipboard (NULL))
     {
 <at>  <at>  -243,12 +244,18  <at>  <at>  fhandler_dev_clipboard::read (void *ptr,
       cygcb_t *clipbuf = (cygcb_t *) cb_data;

       if (pos < clipbuf->len)
-      	{
+	{
 	  ret = ((len > (clipbuf->len - pos)) ? (clipbuf->len - pos) : len);
 	  memcpy (ptr, clipbuf->data + pos , ret);
 	  pos += ret;
 	}
     }
+  else if ((rach = get_readahead ()) >= 0)
+    {
+      /* Deliver from read-ahead buffer. */
+      * (char *) ptr = rach;
+      ret = 1;
+    }
(Continue reading)

Adam Dinwoodie | 3 Aug 11:07 2012

[PATCH] Make `makewhatis` FAQ entry explicitly refer to `whatis`

All,

Minor FAQ patch below to make it explicit that `makewhatis` is used for
`whatis` as well as `man -k` and `apropos`. Inspired by someone [apparently
being confused][0] on Stack Overflow (yes, they were almost certainly being
lazy, but I figure being more explicit will do no harm).

[0]: http://stackoverflow.com/questions/11774230/unix-cygwin-whatis-returns-all-commands-as-nothing-appropriate/11782300#comment15656666_11782300

I'm hoping this doesn't count as "significant" with regard to copyright
assignment. I'd really rather not have to deal with that tedium.

This is my first submitted patch; I *think* I've got everything right, but
apologies if not.

2012-08-03  Adam Dinwoodie  <Adam.Dinwoodie <at> ...>

	* faq-using.xml (faq.using.man): Make relevance to whatis explicit.

Index: faq-using.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/faq-using.xml,v
retrieving revision 1.45
diff -u -p -r1.45 faq-using.xml
--- faq-using.xml       23 Apr 2012 22:10:37 -0000      1.45
+++ faq-using.xml       3 Aug 2012 08:55:03 -0000
 <at>  <at>  -238,7 +238,8  <at>  <at>  related messages.
 </answer></qandaentry>

 <qandaentry id="faq.using.man">
(Continue reading)

Warren Young | 31 Jul 23:01 2012

rebaseall info out of date

This paragraph in the rebase package README:

> Note that rebaseall is only a stop-gap measure.  Eventually the rebase
> functionality will be added to Cygwin's setup.exe, so that rebasing will
> happen automatically.

...should be rewritten.  I propose: "You should not need to run 
rebaseall by hand.  setup.exe has done so automatically at the end of 
each installation since Mumble 2012."  (May?  April?)

A similar thing is going on in FAQ item 4.44.  I think that FAQ item 
should be split in two, with all the rebasing related stuff answering a 
new FAQ item, "Why does Cygwin need rebasing?", refocused on talking 
about what setup.exe/rebaseall now does automatically and why.  FAQ item 
4.44 will then talk about the remaining reasons fork() can fail, and 
their possible fixes.

And while I'm proposing work for other people :) is there a better 
reason program usage info is in the README instead of man pages, besides 
lack of time or interest?  In trying to answer the question "Why do we 
need rebasing?" for myself, I first tried "man rebase".  (Yes, I did 
eventually answer the question to my satisfaction.)


Gmane