diff options
author | Andre Heinecke <aheinecke@intevation.de> | 2018-10-31 14:18:35 +0100 |
---|---|---|
committer | Andre Heinecke <aheinecke@intevation.de> | 2018-10-31 14:20:22 +0100 |
commit | 5b898b8bc89c18e2fd02e6c9efd5e91cb96357cc (patch) | |
tree | 423dd7ecf9ee647054d2c12359a1e3c788bc34f8 | |
parent | 2e9ee747ac81434ca542291287eb56c9025f0a39 (diff) | |
download | libgpg-error-5b898b8bc89c18e2fd02e6c9efd5e91cb96357cc.tar.gz |
w32: Remove cruft in w32-estream from olden times.
* src/w32-io.c (set_synchronize): Remove.
(create_reader, create_writer): No need for set_synchronize.
--
The set_synchronize dates back to 2001 at a time when gpgme got
the Windows support on WindowsME and Windows2000. Maybe this was
required then due to bugs in that old NT or partly NT based Windows
versions.
Removal similar to the removal in gpgme's w32-io.
-rw-r--r-- | src/w32-estream.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/w32-estream.c b/src/w32-estream.c index 6f916b0..5d29b2c 100644 --- a/src/w32-estream.c +++ b/src/w32-estream.c @@ -119,32 +119,6 @@ struct estream_cookie_w32_pollable }; -static HANDLE -set_synchronize (HANDLE hd) -{ -#ifdef HAVE_W32CE_SYSTEM - return hd; -#else - HANDLE new_hd; - - /* For NT we have to set the sync flag. It seems that the only way - to do it is by duplicating the handle. Tsss... */ - if (!DuplicateHandle (GetCurrentProcess (), hd, - GetCurrentProcess (), &new_hd, - EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) - { - trace_errno (1, ("DuplicateHandle failed: ec=%d", (int)GetLastError ())); - /* FIXME: Should translate the error code. */ - _gpg_err_set_errno (EIO); - return INVALID_HANDLE_VALUE; - } - - CloseHandle (hd); - return new_hd; -#endif -} - - static DWORD CALLBACK reader (void *arg) { @@ -289,7 +263,6 @@ create_reader (estream_cookie_w32_pollable_t pcookie) return NULL; } - ctx->have_data_ev = set_synchronize (ctx->have_data_ev); InitializeCriticalSection (&ctx->mutex); #ifdef HAVE_W32CE_SYSTEM @@ -593,7 +566,6 @@ create_writer (estream_cookie_w32_pollable_t pcookie) return NULL; } - ctx->is_empty = set_synchronize (ctx->is_empty); InitializeCriticalSection (&ctx->mutex); #ifdef HAVE_W32CE_SYSTEM |