comparison atomicio.h @ 1323:83d85b28b353

upgrade atomicio in order to remove K&R code in atomicio.c now, vwrite comes from atomicio.h
author Francois Perrad <francois.perrad@gadz.org>
date Fri, 25 Mar 2016 12:05:17 +0100
parents fe6bca95afa7
children
comparison
equal deleted inserted replaced
1322:826a3293fe5a 1323:83d85b28b353
1 /* $OpenBSD: atomicio.h,v 1.7 2006/03/25 22:22:42 djm Exp $ */
1 2
2 /* 3 /*
3 * Copied from OpenSSH 3.6.1p2, required for loginrec.c 4 * Copied from OpenSSH/OpenBSD, required for loginrec.c
4 *
5 * $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $
6 * 5 *
7 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 6 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
8 * All rights reserved. 7 * All rights reserved.
9 * 8 *
10 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 28 */
30 29
31 #include "includes.h" 30 /*
31 * Ensure all of data on socket comes through. f==read || f==vwrite
32 */
33 size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
32 34
33 /* 35 #define vwrite (ssize_t (*)(int, void *, size_t))write
34 * Ensure all of data on socket comes through. f==read || f==write
35 */
36 ssize_t atomicio(ssize_t (*)(), int, void *, size_t);