w32: Remove cruft in w32-io from WindowsME 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 I wrote 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. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
78be1e2f54
commit
2e07d4f89a
29
src/w32-io.c
29
src/w32-io.c
@ -247,33 +247,6 @@ get_desired_thread_priority (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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))
|
|
||||||
{
|
|
||||||
TRACE1 (DEBUG_SYSIO, "gpgme:set_synchronize", hd,
|
|
||||||
"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
|
static DWORD CALLBACK
|
||||||
reader (void *arg)
|
reader (void *arg)
|
||||||
{
|
{
|
||||||
@ -470,7 +443,6 @@ create_reader (int fd)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->have_data_ev = set_synchronize (ctx->have_data_ev);
|
|
||||||
INIT_LOCK (ctx->mutex);
|
INIT_LOCK (ctx->mutex);
|
||||||
|
|
||||||
#ifdef HAVE_W32CE_SYSTEM
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
@ -843,7 +815,6 @@ create_writer (int fd)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->is_empty = set_synchronize (ctx->is_empty);
|
|
||||||
INIT_LOCK (ctx->mutex);
|
INIT_LOCK (ctx->mutex);
|
||||||
|
|
||||||
#ifdef HAVE_W32CE_SYSTEM
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
|
Loading…
Reference in New Issue
Block a user