1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Drop ifdef nonsense: just use setvbuf(3).

Pointed out by:		kib, bde
This commit is contained in:
Pedro F. Giffuni 2014-06-21 14:07:33 +00:00
parent 0279beeb0e
commit 90d81f30ec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267703

View File

@ -162,20 +162,14 @@ main(int argc, char *argv[])
ispan = 0; /* don't span across input files */
break;
case 'l':
if(setlinebuf(stdout) != 0)
warnx("setlinebuf() failed");
if(setvbuf(stdout, NULL, _IOLBF, 0) != 0)
warnx("setting line buffered output failed");
break;
case 'n':
nflag = 1;
break;
case 'u':
#ifdef _IONBF
c = setvbuf(stdout, NULL, _IONBF, 0);
#else
c = -1;
errno = EOPNOTSUPP;
#endif
if (c)
if(setvbuf(stdout, NULL, _IONBF, 0) != 0)
warnx("setting unbuffered output failed");
break;
default: