From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21470 invoked by alias); 18 Dec 2013 19:18:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21459 invoked by uid 89); 18 Dec 2013 19:18:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2013 19:17:59 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 366381A082F; Wed, 18 Dec 2013 20:17:57 +0100 (CET) Date: Wed, 18 Dec 2013 19:18:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing Message-ID: <20131218191757.GC30010@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <52ab8d0e.8aa2420a.30ff.ffffd8f1SMTPIN_ADDED_BROKEN@mx.google.com> <52AF3493.9090708@redhat.com> <20131218112045.GQ30010@calimero.vinschen.de> <83bo0ecgdw.fsf@gnu.org> <20131218160707.GV30010@calimero.vinschen.de> <834n66ccs9.fsf@gnu.org> <20131218171819.GY30010@calimero.vinschen.de> <831u1acblu.fsf@gnu.org> <20131218173155.GA30010@calimero.vinschen.de> <83zjnyaupt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="chReQkDOePndSGWY" Content-Disposition: inline In-Reply-To: <83zjnyaupt.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00721.txt.bz2 --chReQkDOePndSGWY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1783 On Dec 18 20:18, Eli Zaretskii wrote: > > Date: Wed, 18 Dec 2013 18:31:55 +0100 > > From: Corinna Vinschen > >=20 > > > So lifting the 260-char limit means both go to Unicode _and_ use the > > > \\?\ format of file names, is that right? > >=20 > > Right. > >=20 > > > 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? > >=20 > > 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. >=20 > I don't think they can do that, because it would mean that relative > file names, "../foo", etc. are forbidden for _wfopen. The CRT > functions must go through file-name normalization, so unless they > detect \\?\ file names up front and refrain from any processing, the > long file names will not work, because the normalization routines are > where these limitations live, AFAIK. There's a lot of theory here. Did you actually *try* it? I just did: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #include #include int main(void) { FILE *fp; fp =3D _wfopen (L"\\\\?\\C:\\Windows\\System32\\ntdll.dll", L"r"); if (!fp) printf ("_wfopen w/ long pathname fails, errno =3D %d\n", errno); else { printf ("_wfopen w/ long pathname works\n"); fclose(fp); } return 0; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --chReQkDOePndSGWY Content-Type: application/pgp-signature Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSsfTlAAoJEPU2Bp2uRE+gPbYP/j1fPniMK3ZQ2RbUEOQKsINc VugUJx6Bvi1aZBUySefR55QJdbpoANx5zDA4IAIj4QsCyHuzmioz9nSM+JBBY2It peH/vwpEnjyhz6I2RrGkts1fcl7RifxJddPPMaVAbaZqGw+RdpqMLASariLKXfo1 2hGCJCXOqYV9IKTWrUy8/aegru+OZi51guMIdzwA3R5d6Jpjf7dIOob9NQBFFbgV KVbL/5lYyu3lMtccupZOsz/Ri77Zf7sKPGjg+oM1IHASsvC5X593weMnj/1e/PJs SE8H8all3SkHv1QuqrHLmoL9qF1aY9jXnHaeE0NgygiNc9Y4zpRdt7QZZ5EvaELp U390+VeV5ziYGXXcYgPQbfJBWeFYYC6JUmL8oXJADrkqI4+Xw9qdhyPl8uD9WY+Q W+PjTY/i+VCYgyzredhEqQmxyUHA9PdGJXuAu3bu6w5PvaiSdfCwAWzNMWO3Hwzk g1bh2cw2QQfCR0L39HyAJTYOAYh5xGJZGY14/2xZNgeYQgYNTIcaN8gkySZbJyJy Arz+Nuf5jBrfMIqU6Any/vspRrEMDARzrecWpMySgXgpTRqr3TMsvXMFSFZxnsTs U9zjyzF0UXLEWAbIjgDIMzuYT2tVtivYwPfn8pgZ2gC3OL7vJiTFrUgLZm0PMR9Z TbJ5qx7rvQYCsFpQ1Hah =6wYc -----END PGP SIGNATURE----- --chReQkDOePndSGWY--