Warren Young | 10 May 20:19 2013

May I remove setup.xml and cygwin-ug.xml?

These files in winsup/doc appear to have been replaced by setup-net.xml 
and cygwin-ug-net.xml.  The Makefile doesn't use either of these as 
input to any of its outputs, and they're not referenced by any of the 
other input files.

Further, if you try to build a document from either of these, you get 
errors due to missing XML chunks.  (e.g. setup-reg.xml, referenced by 
setup.xml, doesn't exist.)

When I first discovered this, I thought for sure it meant I'd somehow 
screwed up the SGML to DocBook XML conversion, but ruled that out thus:

     $ grep -Rsl setup-reg winsup

If you do that to both the current tree and to a tree rolled back to 
before I got my commit bit, you find that only setup.{xml,sgml} contains 
that string.  It means the pre-Warren tree couldn't build documents from 
this file, either.

I'm not in any particular hurry to get rid of these files.  They only 
trouble they're causing is the same any clutter causes.  I want to make 
sure no one knows a reason either has to remain in existence before I 
nuke them.

Yaakov (Cygwin/X | 30 Apr 04:49 2013

[PATCH] fix GCC 4.7 warnings

The attached patch fixes the remaining warnings in HEAD with GCC 4.7.3. 
  OK to apply?

Attachment (cygwin-gcc47.patch): text/x-patch, 26 KiB

Forgotted appersand

On cygwin-64bit-branch I think one appersand is forgotten.

--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
 <at>  <at>  -1176,7 +1176,7  <at>  <at>  fhandler_disk_file::ftruncate (off_t length,
bool allow_truncate)
       /* Create sparse files only when called through ftruncate, not when
 	 called through posix_fallocate. */
       if (allow_truncate && pc.support_sparse ()
-	  & !has_attribute (FILE_ATTRIBUTE_SPARSE_FILE)
+	  && !has_attribute (FILE_ATTRIBUTE_SPARSE_FILE)
 	  && length >= fsi.EndOfFile.QuadPart + (128 * 1024))
 	  status = NtFsControlFile (get_handle (), NULL, NULL, NULL, &io,

Best regards,

Yaakov (Cygwin/X | 20 Mar 07:22 2013

[PATCH 64bit] Fix ONDEE for 64bit, part 2

Unfortunately I missed something last time when I tried fixing ONDEE.
Patch attached.

Attachment (cygwin-ondee-64bit-part2.patch): application/octet-stream, 3099 bytes
Yaakov | 4 Mar 09:12 2013

[PATCH 64bit] Fix ONDEE for 64bit


More fun from our good friend, size_t:

Because operator new (in its various forms) takes a size_t argument, it
is mangled differently on x86_64 above and beyond the common leading
underscore issue.  Patches for winsup/cygwin and gcc (on top of your
latest patch) attached.

Attachment (cygwin-ondee-64bit.patch): text/x-patch, 3663 bytes
Attachment (gcc48-ondee-64bit.patch): text/x-patch, 2718 bytes
Yaakov | 21 Feb 06:15 2013

[PATCH 64bit] lsaauth: skip 32bit DLL on 64bit target, part 2

The attached patch is a follow-up to my previous lsaauth patch. FWIW,
it worked as intended only because the toplevel Makefile provided
target_alias; this fixes make in the subdir.

Attachment (lsaauth-64bit-part2.patch): text/x-patch, 1543 bytes
Yaakov | 21 Feb 03:38 2013

[PATCH] Missing dllimport's in <error.h>

The attached patch for HEAD is required for compiling code which uses
<error.h> and -Wl,--disable-auto-import.

Yaakov | 20 Feb 22:31 2013

[PATCH] utils: force static linkage

Last time I checked, we were linking all utils statically, so this
caught me by surprise:

$ /bin/ldd dumper.exe 
	ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77d70000)
	kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x75a50000)
	KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x76ef0000)
	cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
	cygintl-8.dll => /usr/bin/cygintl-8.dll (0x49bd0000)
	cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x6bfb0000)
	??? => ??? (0x550000)

The -static flag implies -static-libgcc (see gcc -dumpspecs) and affects
all other libraries (including libstdc++).  Patch for HEAD attached.

Attachment (utils-static.patch): text/x-patch, 1356 bytes
Yaakov | 20 Feb 22:16 2013

[PATCH 64bit] Export <io.h> symbols with underscore

I have already encountered issues with the lack of leading-underscored
exports for symbols declared in <io.h>, as usage thereof often occurs
in shared Cygwin/Win32 conditional code, and on Win32 these are
underscored.  Patch attached for the two symbols I have seen so far,
but I wonder if I should just get it over with and add _access as well.

Yaakov (Cygwin/X | 20 Feb 10:32 2013

[PATCH 64bit] ssize_t

Here is the patch for cygwin necessary for my newly-posted newlib patch.

Attachment (cygwin-64bit-ssize_t.patch): application/octet-stream, 4104 bytes
Dennis de Champeaux | 18 Feb 17:51 2013

Qsort defects (in C-library)

// I hope this is the proper mailing list

Qsort defects

Qsort was described in a 1993 paper by Bentley & McIlroy.

Let me start with the good news.
Someone replaced a 2nd recursive call at the bottom by tail recursion.

Here the bad news.
Someone modified the code with an "improvement", which has seriously
damaged the performance.
The idea of the "improvement" was to keep track of whether during
partitioning a swap had occurred.  If not it was deemed good to call
up insertion sort with:

       if (swap_cnt == 0) {  /* Switch to insertion sort */
        for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es)
            for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0;
                 pl -= es)
                swap(pl, pl - es);

This causes qsort to descend in quadratic explosions on around 3% of
the 630 problems of the Bentley-test bench (described in the paper).

The fix: remove this code fragment and remove the stuff involving
(Continue reading)