sync code with last improvements from OpenBSD
This commit is contained in:
parent
a959d2beea
commit
3252c81e6b
29 changed files with 283 additions and 186 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: putc.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
|
||||
/* $OpenBSD: putc.c,v 1.14 2023/10/06 16:41:02 millert Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@ -32,7 +32,6 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "local.h"
|
||||
|
||||
/*
|
||||
|
@ -43,10 +42,8 @@
|
|||
int
|
||||
putc_unlocked(int c, FILE *fp)
|
||||
{
|
||||
if (cantwrite(fp)) {
|
||||
errno = EBADF;
|
||||
if (cantwrite(fp))
|
||||
return (EOF);
|
||||
}
|
||||
_SET_ORIENTATION(fp, -1);
|
||||
return (__sputc(c, fp));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue