From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 20:15:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4846551A; Sun, 7 Dec 2014 20:15:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 347EEDC1; Sun, 7 Dec 2014 20:15:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB7KF85S099177; Sun, 7 Dec 2014 20:15:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB7KF8Hj099176; Sun, 7 Dec 2014 20:15:08 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412072015.sB7KF8Hj099176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 7 Dec 2014 20:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275581 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2014 20:15:08 -0000 Author: pfg Date: Sun Dec 7 20:15:07 2014 New Revision: 275581 URL: https://svnweb.freebsd.org/changeset/base/275581 Log: Prefer setvbuf() to setlinebuf(). On FreeBSD's libc setlinebuf is a wrapper to setvbuf anyways. Obtained from: OpenBSD MFC after: 5 days Modified: head/usr.bin/patch/patch.c Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Sun Dec 7 18:17:24 2014 (r275580) +++ head/usr.bin/patch/patch.c Sun Dec 7 20:15:07 2014 (r275581) @@ -23,7 +23,7 @@ * -C option added in 1998, original code by Marc Espie, based on FreeBSD * behaviour * - * $OpenBSD: patch.c,v 1.50 2012/05/15 19:32:02 millert Exp $ + * $OpenBSD: patch.c,v 1.52 2014/11/26 18:34:51 millert Exp $ * $FreeBSD$ * */ @@ -150,8 +150,8 @@ main(int argc, char *argv[]) const char *tmpdir; char *v; - setlinebuf(stdout); - setlinebuf(stderr); + setvbuf(stdout, NULL, _IOLBF, 0); + setvbuf(stderr, NULL, _IOLBF, 0); for (i = 0; i < MAXFILEC; i++) filearg[i] = NULL;