This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Add support for Windows 8, first step
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 13 Oct 2011 17:52:16 +0200
- Subject: Re: Add support for Windows 8, first step
- References: <4E949B40.20402@gmail.com> <20111012082643.GA10913@calimero.vinschen.de> <4E95FC38.1090500@gmail.com> <20111013103332.GA18819@calimero.vinschen.de>
- Reply-to: cygwin-developers at cygwin dot com
On Oct 13 12:33, Corinna Vinschen wrote:
> On Oct 12 23:44, Teemu NÃtkinniemi wrote:
> > On 12.10.2011 11:26, Corinna Vinschen wrote:
> > >Windows 8 will very likely support the FAST_CWD stuff, the problem is
> > >just to find out how to find the global pointer pointing to the current
> > >FAST_CWD structure, and then, if the FAST_CWD structure changed.
> >
> > It does do that, the code looks almost the same as in Windows 7.
> > There are some differences that I haven't figured out yet. But I
> > might actually wait for a beta version of Windows 8 before going
> > forward.
>
> Your original mail got me thinking, so I installed the Windows 8 preview
> in qemu/kvm, reverted the system to the good old start menu(*), and
> installed Cygwin.
>
> First I inspected the FAST_CWD datastructure, and from what I can see,
> it resembles closely the *old* structure used before KB 2393802 on Vista
> and W7:
>
> typedef struct _FAST_CWD_8 {
> LONG ReferenceCount;
> HANDLE DirectoryHandle;
> ULONG OldDismountCount;
> UNICODE_STRING Path;
> LONG FSCharacteristics;
> WCHAR Buffer[MAX_PATH];
> } FAST_CWD_8, *PFAST_CWD_8;
>
> See? The only difference is apparently the addition of the
> FSCharacteristics member from the current FAST_CWD structure on
> Vista/W7.
>
> That makes me a bit suspicious. Why on earth should the structure
> layout be changed back without need? Maybe it has something to do
> with an optimized structure layout on 64 bit?!?
>
> Anyway, I will check in a patch, today or tomorrow, which adds code
> to use the new structure on W8.
I just checked in my patch. I introduced a new class fcwd_access_t
which hides the implementation details so find_fast_cwd and
cwdstuff::override_win32_cwd don't have to know the actual structure
layout. Thus, if a nother FAST_CWD structure comes along, we only have
to change (hopefully) a bit of code in fcwd_access_t.
I didn't try to find out how to compute fast_cwd_ptr on W8 yet, but
at least the FAST_CWD stuff should work fine using the "couldn't compute
fast_cwd_ptr hack" in cwdstuff::override_win32_cwd on W8 now...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat