/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* play.c: Playing the game
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
- * Ron Koenderink, 2007
+ * Ron Koenderink, 2007-2009
*/
#include <config.h>
{
assert(!oaction);
assert(action);
-
+
if (signal == SIGPIPE)
assert(action->sa_handler == SIG_IGN);
else {
* Initialize and start the stdin reading thread for WIN32
*/
static void
-sysdep_stdin_init()
+sysdep_stdin_init(void)
{
- bounce_empty = CreateEvent(NULL, FALSE, TRUE, "bounce_empty");
- bounce_full = CreateEvent(NULL, TRUE, FALSE, "bounce_full");
- ctrl_c_event = CreateEvent(NULL, FALSE, FALSE, "Ctrl_C");
+ bounce_empty = CreateEvent(NULL, FALSE, TRUE, NULL);
+ bounce_full = CreateEvent(NULL, TRUE, FALSE, NULL);
+ ctrl_c_event = CreateEvent(NULL, FALSE, FALSE, NULL);
CreateThread(NULL, 0, stdin_read_thread, NULL, 0, NULL);
}
return -1;
}
WSACloseEvent(handles[num_handles - 1]);
-
+
if (num_handles == 3 && result == WAIT_OBJECT_0) {
errno = EINTR;
return -1;
w32_recv((sock), (buffer), (buf_size), 0)
#define select(nfds, rd, wr, error, time) \
w32_select((nfds), (rd), (wr), (error), (time))
+#define sigemptyset(mask) ((void)0)
#else
#define sysdep_stdin_init() ((void)0)
#endif
int n;
sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
sa.sa_handler = intr;
sigaction(SIGINT, &sa, NULL);
sa.sa_handler = SIG_IGN;