From owner-svn-src-head@freebsd.org Tue Oct 27 00:01:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C17E5A1EBEF for ; Tue, 27 Oct 2015 00:01:34 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8F31760 for ; Tue, 27 Oct 2015 00:01:34 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lbbwb3 with SMTP id wb3so51971272lbb.1 for ; Mon, 26 Oct 2015 17:01:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=5+74Bk5okEAEMg0Hy7KlhiVda0jXBDZ/7WDOKe5sFkM=; b=hOSQE/ERFjloPKWjRDvC1mUUyVWYopcPBXSpM5K6qNPh0OM4+3dn5pGnL5Bzbyipsn /TsGODqRpJq5ezMur9AG17V4TWRQGLENYeP9QnDQzFwsFY0Q6WGksghTCDSHr+ac0HQ8 UzPX/npNavtewmQi54BI7q5ohrbOcKghVQ1LzwMJBPUaFtpFS7+TbSOXbVAlw2lSP2IE yG2aGflHojgL6Ag0y19v6xMXee4vnWmEvYa9La80gD4Sq2Ze/OCv8SSoiI9+IXlKe0Mq TaAw0BNbiFhhT7J5aB7VTK8TaUZjT/H/w3KIlIDZih9kOYU2rDdx6l/hRHm+B1Ye5M6i 3B+Q== X-Gm-Message-State: ALoCoQlBY35Sp3qLRSVoSruujmq/wVrXcIs+VA9OT/0O9m+8/0FcI4ZEmWap4dJfnQ06tG4tE4Jy X-Received: by 10.112.167.3 with SMTP id zk3mr3001970lbb.103.1445903748278; Mon, 26 Oct 2015 16:55:48 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id zk5sm6343964lbb.18.2015.10.26.16.55.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2015 16:55:47 -0700 (PDT) Subject: Re: svn commit: r289863 - head/lib/libc/stdio To: John Baldwin References: <201510240223.t9O2NFiY011536@repo.freebsd.org> <2119048.oF1gNjmV7i@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <562EBD7F.6090009@freebsd.org> Date: Tue, 27 Oct 2015 02:55:43 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <2119048.oF1gNjmV7i@ralph.baldwin.cx> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 00:01:34 -0000 On 26.10.2015 20:27, John Baldwin wrote: > On Saturday, October 24, 2015 02:23:15 AM Andrey A. Chernov wrote: >> Author: ache >> Date: Sat Oct 24 02:23:15 2015 >> New Revision: 289863 >> URL: https://svnweb.freebsd.org/changeset/base/289863 >> >> Log: >> Since no room left in the _flags, reuse __SALC for O_APPEND. >> It helps to remove _fcntl() call from _ftello() and optimize seek position >> calculation in _swrite(). > > You could just add a _flags2 to FILE if that would be cleaner. It should even > be MFC'able without being an ABI change since stdio always allocates FILE > objects internally and we only export pointers to them. Programs do not > allocate them statically. > Thanx, I understand it from your bugzilla answer, but I have a doubt. What if some 3rd party port will use static FILE f; and then &f? Some of ports may deal with FILE internals and I don't know which ones. I prefer rather to not break something there and currently I need only one flag and __SALC is not conflicting since used only with _file = -1 and __SSTR. If you or somebody else will need another flag and be brave enough to add _flags2, this patch can be easily converted. -- http://ache.vniz.net/