Re: [HEADSUP] Let's start a Cygwin 1.7 release area
On Apr 15 19:28, Brian Dessent wrote: So, with that in mind, are there any objections to simply HK{LM,CU}\Software\Cygwin? Just go ahead. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
On Apr 15 21:55, Brian Dessent wrote: Corinna Vinschen wrote: I just found that, regardless of my privileges, setup-1.7 defaults to install for just me instead of all users while the standard setup defaults to all users. Why does that happen? This is very odd. Setup's is_admin() was returning 0 despite the user belonging to the administrators group, and debugging revealed that the cause was the following: // Get the group token information UCHAR token_info[1024]; PTOKEN_GROUPS groups = (PTOKEN_GROUPS) token_info; DWORD token_info_len = sizeof (token_info); status = GetTokenInformation (token, TokenGroups, token_info, token_info_len, token_info_len); CloseHandle (token); if (!status) return 0; For whatever reason, GetTokenInformation was failing and returning ERROR_NOACCESS when passed a 1024 byte buffer. I changed the code to first call it with NULL to get the desired size, and that seems to have satisfied it. I cannot explain why it would object to a 1024 byte buffer, maybe you have some idea. Not really, no. 1024 bytes should be big enough in most cases. Did you look for the desired size which now gets returned by the NULL call? I'll install an updated setup-1.7.exe in a moment. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
Corinna Vinschen wrote: Not really, no. 1024 bytes should be big enough in most cases. Did you look for the desired size which now gets returned by the NULL call? Yes, it was in the neighborhood of 230 bytes or so. It wasn't that the buffer was too small, and I would have expected ERROR_INSUFFICIENT_BUFFER anyway in that case. It was just something about the buffer that it didn't like. Brian
Re: setup-1.7 defaults to Just me
On Apr 16 02:12, Brian Dessent wrote: Corinna Vinschen wrote: Not really, no. 1024 bytes should be big enough in most cases. Did you look for the desired size which now gets returned by the NULL call? Yes, it was in the neighborhood of 230 bytes or so. It wasn't that the buffer was too small, and I would have expected ERROR_INSUFFICIENT_BUFFER anyway in that case. It was just something about the buffer that it didn't like. Alignment? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
On Apr 16 11:28, Corinna Vinschen wrote: On Apr 16 02:12, Brian Dessent wrote: Corinna Vinschen wrote: Not really, no. 1024 bytes should be big enough in most cases. Did you look for the desired size which now gets returned by the NULL call? Yes, it was in the neighborhood of 230 bytes or so. It wasn't that the buffer was too small, and I would have expected ERROR_INSUFFICIENT_BUFFER anyway in that case. It was just something about the buffer that it didn't like. Alignment? I mean, token_info was an UCHAR array, so it's not aligned while the token_group information might require a 4 or 8 byte alignment which you now get by chance. Probably you'd be better off not using `char buf[size]' but PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size); instead because alloca always aligns sufficiently. What sounds strange here is that MSDN does not state anything about alignment requirements for the GetTokenInformation call. However, it also didn't say anything about alignment requirements of ZwQueryDirectoryFile but it failed on W2K for that reason nevertheless. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
On Apr 16 02:45, Brian Dessent wrote: Corinna Vinschen wrote: Alignment? Perhaps. Do you know if gcc aligns VLAs higher than their natural alignment? The nonworking code was just UCHAR foo[1024] whereas the working was char buf[size], which I cribbed from grp.cc:internal_getgroups(). Maybe such a dynamic stack allocation like `char buf[size]' uses an alloca-like function under the hood which also always aligns sufficently for all datatypes. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
Corinna Vinschen wrote: Alignment? Perhaps. Do you know if gcc aligns VLAs higher than their natural alignment? The nonworking code was just UCHAR foo[1024] whereas the working was char buf[size], which I cribbed from grp.cc:internal_getgroups(). Brian
Re: setup-1.7 defaults to Just me
On Apr 16 02:49, Brian Dessent wrote: Don't you love discovering these little pearls of joy inside the Win32 API? They're like little rays of sunshine. No wait, the opposite. Big rays of moonshine? ;) Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: [HEADSUP] Let's start a Cygwin 1.7 release area
On Apr 15 20:51, Lapo Luchini wrote: PS: my only WinXP box is still waiting for his motherboard back from RMA... I'll try qemu to test cygwin-1.7 and, if it's not too slow, produce updated packages for both 1.5 and 1.7 (or is 1.7 near enough that is better to update that first?). We will not make 1.7 an official release for some time. For the official release, please stick to 1.5. You can create update packages for 1.7 for your local installation, but let's wait a couple of days uploading 1.7 packages until Chris changed the release area to use unionfs. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Re: setup-1.7 defaults to Just me
Corinna Vinschen wrote: I mean, token_info was an UCHAR array, so it's not aligned while the token_group information might require a 4 or 8 byte alignment which you now get by chance. Probably you'd be better off not using `char buf[size]' but PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size); Interesting: #include stdio.h #include malloc.h int main (int argc, char **argv) { char vla[argc * 250]; char *alloca_array = (char *) alloca (argc * 250); char normal_array[1024]; printf (alignof(vla) = %d\n, __alignof__ (vla)); printf (alignof(alloca_array) = %d\n, __alignof__ (alloca_array)); printf (alignof(normal_array) = %d\n, __alignof__ (normal_array)); return 0; } Returns: alignof(vla) = 1 alignof(alloca_array) = 4 alignof(normal_array) = 1 So, perhaps this is working now by accident? for the GetTokenInformation call. However, it also didn't say anything about alignment requirements of ZwQueryDirectoryFile but it failed on W2K for that reason nevertheless. Don't you love discovering these little pearls of joy inside the Win32 API? They're like little rays of sunshine. No wait, the opposite. Brian
Re: setup-1.7 defaults to Just me
On Apr 16 02:45, Brian Dessent wrote: Corinna Vinschen wrote: Alignment? Perhaps. Do you know if gcc aligns VLAs higher than their natural alignment? The nonworking code was just UCHAR foo[1024] whereas the working was char buf[size], which I cribbed from grp.cc:internal_getgroups(). Oh well, I suspected that I did that as well. As I said in the other reply, I never saw any alignment requirements for GetTokenInformation before. I just don't see any other potential reason for the ERROR_NOACCESS in this case. I'll fix that in grp.cc, too. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
Perl 5.10 stabilization
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Reini, My perl packages are now ready for 5.10, as soon as you're ready to stabilize: ftp://sunsite.dk/projects/cygwinports/release/help2man/help2man-1.36.4-2-src.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/help2man/help2man-1.36.4-2.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/help2man/setup.hint ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-Depends/perl-ExtUtils-Depends-0.300-1-src.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-Depends/perl-ExtUtils-Depends-0.300-1.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-Depends/setup.hint ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-PkgConfig/perl-ExtUtils-PkgConfig-1.11-1-src.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-PkgConfig/perl-ExtUtils-PkgConfig-1.11-1.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-ExtUtils-PkgConfig/setup.hint ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Locale-gettext/perl-Locale-gettext-1.05-3-src.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Locale-gettext/perl-Locale-gettext-1.05-3.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Locale-gettext/setup.hint ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Tk/perl-Tk-804.028-1-src.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Tk/perl-Tk-804.028-1.tar.bz2 ftp://sunsite.dk/projects/cygwinports/release/perl/perl-Tk/setup.hint IMPORTANT on the Tk setup.hint: s/libX11_6/xorg-x11-bin-dlls/ Yaakov -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkgGAX0ACgkQpiWmPGlmQSPtgQCg4tRElvzF2goUjwKJmmwJjr9F 1JwAoNSPBGiiMaLoBJDPJNItw1dgrxbT =rhHt -END PGP SIGNATURE-
Re: setup-1.7 defaults to Just me
On Wed, Apr 16, 2008 at 02:49:33AM -0700, Brian Dessent wrote: Don't you love discovering these little pearls of joy inside the Win32 API? They're like little rays of sunshine. No wait, the opposite. Windoze rulez! cgf
Re: [HEADSUP] Let's start a Cygwin 1.7 release area
On Wed, Apr 16, 2008 at 11:39:16AM +0200, Corinna Vinschen wrote: On Apr 15 20:51, Lapo Luchini wrote: PS: my only WinXP box is still waiting for his motherboard back from RMA... I'll try qemu to test cygwin-1.7 and, if it's not too slow, produce updated packages for both 1.5 and 1.7 (or is 1.7 near enough that is better to update that first?). We will not make 1.7 an official release for some time. For the official release, please stick to 1.5. You can create update packages for 1.7 for your local installation, but let's wait a couple of days uploading 1.7 packages until Chris changed the release area to use unionfs. I played around a little more with this and found some problems that I have to investigate. When I move a file into the area from another directory it gives an error. That isn't really a big deal but I don't like putting things into production with known problems unless I have a vague understanding of the problem. So it will be a couple more days before I have the time to track this down. The size of this new, purged area is: 1926596K bytes. (I fixed my purge script) cgf