This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 18 Dec 2013 19:28:29 +0200
- Subject: Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- Authentication-results: sourceware.org; auth=none
- References: <52ab8d0e dot 8aa2420a dot 30ff dot ffffd8f1SMTPIN_ADDED_BROKEN at mx dot google dot com> <52AF3493 dot 9090708 at redhat dot com> <20131218112045 dot GQ30010 at calimero dot vinschen dot de> <83bo0ecgdw dot fsf at gnu dot org> <20131218160707 dot GV30010 at calimero dot vinschen dot de> <834n66ccs9 dot fsf at gnu dot org> <20131218171819 dot GY30010 at calimero dot vinschen dot de>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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? 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?