From patchwork Wed Sep 17 16:12:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 390449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D8B3C14009E for ; Thu, 18 Sep 2014 02:12:29 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; q=dns; s=default; b=uvuBFcj54NdNIpzg 9FessfoeTSATW6mJLOdk/r3jaBH0VIA/X5Di7vFrVA+GOic9+LrsF6r60N1cDbdO +1Aqh1pfsqEP+wDZTg6BUR0H3ha89CTnf1OeNCqV2o8/j3JSgovy+BjmOUPqdTyF hb324hM8lAprNxyFaRn1rpOc7LI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; s=default; bh=3m9bZdPKTCuDDKWjC50cSO /Ltc0=; b=Y4NKjtxi7Oh7p1Q2wZQ+RctqPs2EAp7qkPlYUXg3KRaD/W1K4B9qck pgb1X2kTuTWP1GLtdujIxbcXkGSuUq+GSaJ7zMYFtZA+WHifSiIV/htZ4hDPrXhI vhEATm1iDQrNcGNnjhX1tIe2SHWHR4/dIRWvQM5k8NoelimUlNyBk= Received: (qmail 29535 invoked by alias); 17 Sep 2014 16:12:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29512 invoked by uid 89); 17 Sep 2014 16:12:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: arjuna.pair.com Received: from arjuna.pair.com (HELO arjuna.pair.com) (209.68.5.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 17 Sep 2014 16:12:19 +0000 Received: by arjuna.pair.com (Postfix, from userid 3006) id CFB828A2CC; Wed, 17 Sep 2014 12:12:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id CF18D8A244; Wed, 17 Sep 2014 12:12:15 -0400 (EDT) Date: Wed, 17 Sep 2014 12:12:15 -0400 (EDT) From: Hans-Peter Nilsson To: Janne Blomqvist cc: FX , Fortran List , GCC Patches Subject: Re: [PR libfortran/62768] Handle filenames with embedded nulls In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 X-IsSubscribed: yes On Wed, 17 Sep 2014, Janne Blomqvist wrote: > > /tmp/hpautotest-gcc1/gcc/libgfortran/io/inquire.c:97:41: error: 'gfc_unit' has no member named 'file' > > fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); > > ^ > > /tmp/hpautotest-gcc1/gcc/libgfortran/io/inquire.c:97:50: error: 'gfc_unit' has no member named 'file_len' > > fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); > > ^ > > make[3]: *** [inquire.lo] Error 1 > > > > brgds, H-P > > Oops, I forgot to update some parts in an #ifdef branch that isn't > taken on my target. I'll try to find time to fix it later tonight. If > you're in a hurry, just replace > > fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); > > with > > cf_strcpy (iqp->name, iqp->name_len, u->filename); > > in inquire.c. Thanks, build completes and I'll commit the following as obvious if there are no regressions. (The indentation change is correct; lining up with the "else". Note the closing brace.) * libgfortran/io/inquire.c (inquire_via_unit) [!HAVE_TTYNAME && !HAVE_TTYNAME_R && !__MINGW32__]: Adjust for last commit. brgds, H-P Index: libgfortran/io/inquire.c =================================================================== --- libgfortran/io/inquire.c (revision 215321) +++ libgfortran/io/inquire.c (working copy) @@ -94,7 +94,7 @@ inquire_via_unit (st_parameter_inquire * else fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); #else - fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); + cf_fstrcpy (iqp->name, iqp->name_len, u->filename); #endif }