diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2016-03-25 12:05:17 +0100 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2016-11-15 14:56:25 +0100 |
commit | ecb4a6173df40a887fee2e8198e5c8985e2ca5e5 (patch) | |
tree | 2f67d2d4402413e488f6f1d873874c73b13c9141 /atomicio.h | |
parent | 37a66fa5b64ba36285abd346fc8706e6bef4be31 (diff) |
upgrade atomicio
in order to remove K&R code in atomicio.c
now, vwrite comes from atomicio.h
Diffstat (limited to 'atomicio.h')
-rw-r--r-- | atomicio.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,8 +1,7 @@ +/* $OpenBSD: atomicio.h,v 1.7 2006/03/25 22:22:42 djm Exp $ */ /* - * Copied from OpenSSH 3.6.1p2, required for loginrec.c - * - * $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $ + * Copied from OpenSSH/OpenBSD, required for loginrec.c * * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. * All rights reserved. @@ -28,9 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "includes.h" - /* - * Ensure all of data on socket comes through. f==read || f==write + * Ensure all of data on socket comes through. f==read || f==vwrite */ -ssize_t atomicio(ssize_t (*)(), int, void *, size_t); +size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t); + +#define vwrite (ssize_t (*)(int, void *, size_t))write |