From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13234 invoked by alias); 18 Dec 2013 20:01:26 -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 13222 invoked by uid 89); 18 Dec 2013 20:01:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout23.012.net.il Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2013 20:01:24 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MY000100Q4XBY00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Wed, 18 Dec 2013 22:01:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MY000178QA95JA0@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Wed, 18 Dec 2013 22:01:21 +0200 (IST) Date: Wed, 18 Dec 2013 20:01:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing In-reply-to: <20131218191757.GC30010@calimero.vinschen.de> To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83y53iapy6.fsf@gnu.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> <20131218191757.GC30010@calimero.vinschen.de> X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00722.txt.bz2 > Date: Wed, 18 Dec 2013 20:17:57 +0100 > From: Corinna Vinschen > > > > 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. > > > > 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? No. Who can afford to try everything, unless they are paying you to do that? > I just did: > > =========================================== > #include > #include > > int main(void) > { > FILE *fp; > > fp = _wfopen (L"\\\\?\\C:\\Windows\\System32\\ntdll.dll", L"r"); > if (!fp) > printf ("_wfopen w/ long pathname fails, errno = %d\n", errno); > else > { > printf ("_wfopen w/ long pathname works\n"); > fclose(fp); > } > return 0; > } > =========================================== Thanks, that's good to know. But that's just one CRT function. There are a gazillion of them, and I'm quite sure some use MAX_PATH of 260 internally. Just grep the sources of the CRT functions.