summaryrefslogtreecommitdiff
path: root/src/core/net-nonblock.c
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2015-12-09 23:04:25 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2015-12-09 23:04:25 +0100
commit3468a326242066743803ea0b19f0359cec0ce398 (patch)
tree7ae6496d5d5b0b45d360036def59ba53d40922c1 /src/core/net-nonblock.c
parent544d5a8bba7e00f8b4a8433faea907abce27f557 (diff)
parent96766b7f0530ca2e5b4d0fde68337f956e46eb0e (diff)
downloadirssi-3468a326242066743803ea0b19f0359cec0ce398.zip
Merge pull request #376 from dequis/win32-ifdefs
Remove all WIN32 ifdefs (unifdef -UWIN32)
Diffstat (limited to 'src/core/net-nonblock.c')
-rw-r--r--src/core/net-nonblock.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c
index e637e673..d6e767b6 100644
--- a/src/core/net-nonblock.c
+++ b/src/core/net-nonblock.c
@@ -77,14 +77,11 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
{
RESOLVED_IP_REC rec;
const char *errorstr;
-#ifndef WIN32
int pid;
-#endif
int len;
g_return_val_if_fail(addr != NULL, FALSE);
-#ifndef WIN32
pid = fork();
if (pid > 0) {
/* parent */
@@ -97,7 +94,6 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
g_warning("net_connect_thread(): fork() failed! "
"Using blocking resolving");
}
-#endif
/* child */
srand(time(NULL));
@@ -138,10 +134,8 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
}
}
-#ifndef WIN32
if (pid == 0)
_exit(99);
-#endif
/* we used blocking lookup */
return 0;
@@ -157,9 +151,7 @@ int net_gethostbyname_return(GIOChannel *pipe, RESOLVED_IP_REC *rec)
rec->host4 = NULL;
rec->host6 = NULL;
-#ifndef WIN32
fcntl(g_io_channel_unix_get_fd(pipe), F_SETFL, O_NONBLOCK);
-#endif
/* get ip+error */
if (g_io_channel_read_block(pipe, rec, sizeof(*rec)) == -1) {
@@ -201,9 +193,7 @@ void net_disconnect_nonblock(int pid)
{
g_return_if_fail(pid > 0);
-#ifndef WIN32
kill(pid, SIGKILL);
-#endif
}
static void simple_init(SIMPLE_THREAD_REC *rec, GIOChannel *handle)