summaryrefslogtreecommitdiffhomepage
path: root/atomicio.h
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2016-03-25 12:05:17 +0100
committerFrancois Perrad <francois.perrad@gadz.org>2016-11-15 14:56:25 +0100
commitecb4a6173df40a887fee2e8198e5c8985e2ca5e5 (patch)
tree2f67d2d4402413e488f6f1d873874c73b13c9141 /atomicio.h
parent37a66fa5b64ba36285abd346fc8706e6bef4be31 (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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/atomicio.h b/atomicio.h
index 6c1f3ac..0bd019f 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -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