summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3aea924)
raw | patch | inline | side by side (parent: 3aea924)
author | Avuton Olrich <avuton@gmail.com> | |
Sun, 30 Oct 2011 02:34:57 +0000 (19:34 -0700) | ||
committer | Avuton Olrich <avuton@gmail.com> | |
Thu, 3 Nov 2011 02:33:50 +0000 (19:33 -0700) |
src/main.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index a57f35dfcf27f610fe44972828b23af34b3c76f1..1b351c705b68ede3eb4bc71baa3e10f43e9a5c93 100644 (file)
--- a/src/main.c
+++ b/src/main.c
}
}
+#ifndef WIN32
static void
catch_sigint(G_GNUC_UNUSED int sig)
{
if (1 != write(sigwinch_pipes[1], &irrelevant, 1))
exit(EXIT_FAILURE);
}
+#endif /* WIN32 */
static void
idle_callback(enum mpd_error error,
int
main(int argc, const char *argv[])
{
+#ifndef WIN32
struct sigaction act;
+#endif
#ifdef ENABLE_LOCALE
#ifndef ENABLE_NLS
G_GNUC_UNUSED
/* parse command line options - 2 pass */
options_parse(argc, argv);
+#ifndef WIN32
/* setup signal behavior - SIGINT */
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
perror("sigaction(SIGPIPE)");
exit(EXIT_FAILURE);
}
+#endif
ncu_init();
}
#endif
+#ifndef WIN32
if (!pipe(sigwinch_pipes) &&
!fcntl(sigwinch_pipes[1], F_SETFL, O_NONBLOCK)) {
sigwinch_channel = g_io_channel_unix_new(sigwinch_pipes[0]);
perror("sigwinch pipe creation failed");
exit(EXIT_FAILURE);
}
+#endif
/* attempt to connect */
reconnect_source_id = g_timeout_add(1, timer_reconnect, NULL);