From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 17 19:11:24 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D1C2E2A for ; Sun, 17 Aug 2014 19:11:24 +0000 (UTC) Received: from nm10-vm0.bullet.mail.bf1.yahoo.com (nm10-vm0.bullet.mail.bf1.yahoo.com [98.139.213.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B57247E for ; Sun, 17 Aug 2014 19:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408302681; bh=uAXE9Vyyeq+cAv/tilMKibk0z2ugylUHG2CH42yAbbM=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qJp8Prl5pP90f8qZ2oJ6nbCaBdd+/m42AcGWkiIW6qPLEk9zOfKb4Kan2i151FwFwHUpxohYuwF4riT3r72xbo0DliFSg/P/EGxIte7wHZWv+MXfr6GYBtjMPwId97UDL5L7MrIGaDr4pO6AC33EStHBSEamZR6C/85FPphkl0YXhTXaG+LlP49WBj0WfJPfbnUI+QgIzGx6jryz2vrRNk+kdHKnoICGuEph0wnh4Ofm09XKhd2whMGQjtsZGBeBCY178ZUcgUfq5qcBo91rOgVRCf6+POzf4OR6N4dZd61XPAVufszayVOy+i2kx9k7ahd5vvyHDCVroLKgV3z05A== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=AanV9AmidEx1r+rjvyqUrIM8tH/YdIqltl9Gbd7TLSj/8vYz6fWNLHlUNV5CnF8j5RmjINQqzhrNW+Q/r6QRrZLpCCVtu+2BwGO5qFYDwFhQG7msqNnX6UEckutUi4ymXQQzoDaiTvG0v/Z/FxxlCTC1gmRlOLoHLLoEUTTDw88s31DSWxJxrvm4ldhZmaVvI8WKnS2CGSDEOirO0TZomeX0HleUmGTa79d2qqhsoc3r2sDcGC7JVSTluuQKLBRx8eNI5luiq26y4sDKmddgQh3dAJK8mIIZL2/v4WeJL4zFlBDm0Nck5UBtl6ONvlZ/TYzP/4Xu6Ao803YFecHklw==; Received: from [66.196.81.171] by nm10.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 Received: from [68.142.230.70] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 Received: from [127.0.0.1] by smtp227.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 X-Yahoo-Newman-Id: 137672.67343.bm@smtp227.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tnXI4CoVM1lkMXYPMqNeZyWnnTYcd0f49idQsT9P4flfp99 35MqGP5sEkitD9gq_h06up88okIhAyxZy7gjGEF_bndNL.guloq3JzXnKx_7 OAHFvRjHA7smI8TeqfmPbtmO7W2g3Htm8QDRtow38_dtNAoXH1NuGj03utWz vBWNS_Saqlyc4PDfB986d.gfJI1eoeeqYj5jvV2pPdy6YfZR3rkYZuZIjJDR gpfMxtqrwpJE_E.Hm17Bho6Llvcx9UgrtDBzg3HsKLsnGv3YwGQEgtDDusCT q.BkHulQ6P0XVZr9A6Ijs94wwmGFOPq6WihjTPywAnNutQ5PqZm39JKC.tYh Dg1KWjW5h5o8SI_rj80JEcBkuW7NevlZOT8IqVkOtP6g6YCbPrIo1_5xCStF 0IvcNl6HyneySkfydhrkAtoK7zZ5X_XCj9yUA_vQJ2P22Sv65Mm.zt5x_yXv 7E9miL5GmPXHInS_iOYWsZHl0A7RnJapJSSas4KxG1pswz7bYLt30l4tvcx1 MoXLoDfdPjXhadWnPxHIKPbu49Z.WEaB8DNLTX_1qBcpNwRBeb8g16h8hjm9 zLYcaCidfJ297vgfuq3HaC6Qy8Xk3cbJ8lut7eplEmbtBvHbF86MqnNqXzhY qKOBoPaI- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <53F0FE68.6080501@freebsd.org> Date: Sun, 17 Aug 2014 14:11:36 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrey Chernov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r270035 - stable/10/lib/libc/stdio References: <201408160129.s7G1TojV024013@svn.freebsd.org> <53F0F263.7040202@freebsd.org> In-Reply-To: <53F0F263.7040202@freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:11:24 -0000 On 08/17/14 13:20, Andrey Chernov wrote: > On 16.08.2014 5:29, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sat Aug 16 01:29:49 2014 >> New Revision: 270035 >> URL: http://svnweb.freebsd.org/changeset/base/270035 >> >> Log: >> MFC r268924: >> Update fflush(3) to return success on a read-only stream. >> >> This is done for compliance with SUSv3. The changes cause >> no secondary effects in the gnulib tests (we pass them). > ... >> @@ -122,6 +123,12 @@ __sflush(FILE *fp) >> for (; n > 0; n -= t, p += t) { >> t = _swrite(fp, (char *)p, n); >> if (t <= 0) { >> + /* Reset _p and _w. */ >> + if (p > fp->_p) /* Some was written. */ >> + memmove(fp->_p, p, n); >> + fp->_p += n; >> + if ((fp->_flags & (__SLBF | __SNBF)) == 0) >> + fp->_w -= n; >> fp->_flags |= __SERR; >> return (EOF); >> } >> > The description is incomplete. This code also does internal stdio > structure adjustment for partial write. > Oh yes, I forgot about that part. The story is that Apple only does this for EAGAIN but Bruce suggested it should be done for other errors as well. TBH, I wasn't going to merge this change but it seemed consistent to have all the changes that originated from Apple's libc together. Pedro.