diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2014-11-26 18:34:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2014-11-26 18:34:53 +0000 |
commit | 35b8c30a6f0433fcbf29d035097c44d0fb8cac09 (patch) | |
tree | 42906177e3c7862b1acb0b679e9aa9d3377462ea /bin | |
parent | 5482bf416acec0fc5e5f09533eef538962865157 (diff) |
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ed/main.c | 4 | ||||
-rw-r--r-- | bin/systrace/cradle.c | 4 | ||||
-rw-r--r-- | bin/systrace/systrace.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/ed/main.c b/bin/ed/main.c index 442f3be5cc9..7766038da63 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.40 2014/07/12 02:47:51 guenther Exp $ */ +/* $OpenBSD: main.c,v 1.41 2014/11/26 18:34:51 millert Exp $ */ /* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */ /* main.c: This file contains the main control and user-interface routines @@ -141,7 +141,7 @@ top: if (fstat(STDIN_FILENO, &sb) || !S_ISFIFO(sb.st_mode)) { if (lseek(STDIN_FILENO, 0, SEEK_CUR)) { interactive = 1; - setlinebuf(stdout); + setvbuf(stdout, NULL, _IOLBF, 0); } } } diff --git a/bin/systrace/cradle.c b/bin/systrace/cradle.c index 15fa9495caf..8fe7838afb6 100644 --- a/bin/systrace/cradle.c +++ b/bin/systrace/cradle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cradle.c,v 1.7 2014/10/25 03:17:45 lteo Exp $ */ +/* $OpenBSD: cradle.c,v 1.8 2014/11/26 18:34:51 millert Exp $ */ /* * Copyright (c) 2003 Marius Aamodt Eriksen <marius@monkey.org> @@ -241,7 +241,7 @@ cradle_start(char *path, char *uipath, char *guipath) err(1, "dup2"); if (dup2(s, fileno(stdout)) == -1) err(1, "dup2"); - setlinebuf(stdout); + setvbuf(stdout, NULL, _IOLBF, 0); connected = 1; } diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c index 7a57f77c7cf..4b03999c544 100644 --- a/bin/systrace/systrace.c +++ b/bin/systrace/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.60 2014/08/25 07:50:25 doug Exp $ */ +/* $OpenBSD: systrace.c,v 1.61 2014/11/26 18:34:51 millert Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -503,7 +503,7 @@ requestor_start(char *path, int docradle) err(1, "dup2"); if (dup2(pair[1], fileno(stdout)) == -1) err(1, "dup2"); - setlinebuf(stdout); + setvbuf(stdout, NULL, _IOLBF, 0); close(pair[1]); } @@ -524,7 +524,7 @@ requestor_start(char *path, int docradle) close(pair[0]); - setlinebuf(stdout); + setvbuf(stdout, NULL, _IOLBF, 0); connected = 1; } |