From 0674b8f8e684002e49ccdd9bbce2c9ff2ecab0bc Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 16 Mar 2016 04:56:08 +0000 Subject: [PATCH] remove cpp version of __sputc, since the inline version is all we have ever used. ok jsg --- src/include/stdio.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/include/stdio.h b/src/include/stdio.h index 315e8f9f..c22d5f70 100644 --- a/src/include/stdio.h +++ b/src/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.51 2016/03/14 20:43:03 millert Exp $ */ +/* $OpenBSD: stdio.h,v 1.52 2016/03/16 04:56:08 deraadt Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -393,26 +393,12 @@ __END_DECLS * define function versions in the C library. */ #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) -#if defined(__GNUC__) static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } -#else -/* - * This has been tuned to generate reasonable code on the vax using pcc. - */ -#define __sputc(c, p) \ - (--(p)->_w < 0 ? \ - (p)->_w >= (p)->_lbfsize ? \ - (*(p)->_p = (c)), *(p)->_p != '\n' ? \ - (int)*(p)->_p++ : \ - __swbuf('\n', p) : \ - __swbuf((int)(c), p) : \ - (*(p)->_p = (c), (int)*(p)->_p++)) -#endif #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0)