Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing

Corinna Vinschen
2013-12-18T17:31:59Z

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

On Dec 18 19:28, Eli Zaretskii wrote:
> > Date: Wed, 18 Dec 2013 18:18:19 +0100
> > From: Corinna Vinschen <vinschen@redhat.com>
> >
> > On Dec 18 19:03, Eli Zaretskii wrote:
> > > > Date: Wed, 18 Dec 2013 17:07:07 +0100
> > > > > Are you sure that 32K capability cannot be had with ANSI file names
> > > > > using the \\?\ notation?
> > > >
> > > > Yes. The \\?\ notation only works in the UNICODE API[*]. The reason
> > > > is that the ANSI API is just a thin layer over the actual UNICODE
> > > > functionality, and the conversion from ANSI to UNICODE is done using a
> > > > per-thread fixed-size buffer of 520 bytes.
> > >
> > > Does this mean that using \\?\ with ANSI-encoded file names buys us
> > > 520-byte file names?
> >
> > 260 char ANSI -> 520 bytes UTF-16
>
> Oh, I misunderstood then.
>
> So lifting the 260-char limit means both go to Unicode _and_ use the
> \\?\ format of file names, is that right?

Right.

> If so, it probably means
> that CRT functions that accept wchar_t arrays as file names (_wfopen
> etc.) cannot be used with such long file names, and one needs to call
> the Win32 APIs directly. Correct?

I don't know, but I doubt it. The filenames in case of calling the
_wfopen functions are probably sent directly to the underlying WIn32
functions. There's no good reason to drop the long path prefixes.

Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]