summaryrefslogtreecommitdiff
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-03-25 12:05:17 +0100
commit91ed809fc50d45ead3dfe27603df7d2e153297f3 (patch)
treee0d6b75159933c31be0a147e910abd65f62e1abd /atomicio.h
parentfad703804291b288c53749c0f1842a9d31955054 (diff)
downloaddropbear-91ed809fc50d45ead3dfe27603df7d2e153297f3.tar.gz
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