From 9f746952cfc0254109a098ad617d48c4029c84b6 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 14 Apr 2011 22:34:13 +0200 Subject: [PATCH] Un-break windows --- oio-win.h | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/oio-win.h b/oio-win.h index 288c010a..84293013 100644 --- a/oio-win.h +++ b/oio-win.h @@ -17,27 +17,25 @@ typedef struct oio_buf { char* base; } oio_buf; -struct oio_req_private_s { - union { - /* Used by I/O operations */ - OVERLAPPED overlapped; - /* Used by timers */ - struct { - RB_ENTRY(oio_req_s) tree_entry; - int64_t due; - }; - }; +#define oio_req_private_fields \ + union { \ + /* Used by I/O operations */ \ + OVERLAPPED overlapped; \ + /* Used by timers */ \ + struct { \ + RB_ENTRY(oio_req_s) tree_entry; \ + int64_t due; \ + }; \ + }; \ int flags; -}; -struct oio_handle_private_s { - union { - SOCKET socket; - HANDLE handle; - }; - SOCKET accepted_socket; - struct oio_accept_req_s* accept_reqs; - unsigned int flags; - unsigned int reqs_pending; +#define oio_handle_private_fields \ + union { \ + SOCKET socket; \ + HANDLE handle; \ + }; \ + SOCKET accepted_socket; \ + struct oio_accept_req_s* accept_reqs; \ + unsigned int flags; \ + unsigned int reqs_pending; \ oio_err error; -};