summaryrefslogtreecommitdiffstats
path: root/PICA_common.h
diff options
context:
space:
mode:
authorAnton <anton@picapica>2015-05-11 02:50:03 +0400
committerAnton <anton@picapica>2015-05-11 02:50:03 +0400
commitf4f8d75ca055e3b53549cb0e23ef41c51620b699 (patch)
treeef92bcbd55d368f1eb7d8a0e1d07c93b615ef87e /PICA_common.h
parent30b06d7d978120561f617271c0597763b864c934 (diff)
downloadpica-pica-f4f8d75ca055e3b53549cb0e23ef41c51620b699.tar.gz
pica-pica-f4f8d75ca055e3b53549cb0e23ef41c51620b699.zip
implemented asynchronous processing of c2n connections
Diffstat (limited to 'PICA_common.h')
-rw-r--r--PICA_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/PICA_common.h b/PICA_common.h
index dd92b32..db14f99 100644
--- a/PICA_common.h
+++ b/PICA_common.h
@@ -4,11 +4,11 @@
#ifdef WIN32
#define CLOSE closesocket
#define SHUTDOWN(s) shutdown(s,SD_BOTH)
-#define IOCTLSETNONBLOCKINGSOCKET(s, arg) ioctlsocket(s, FIONBIO, (unsigned long*)(arg))
+#define IOCTLSETNONBLOCKINGSOCKET(s, a) {unsigned long arg = (a); ioctlsocket(s, FIONBIO, (unsigned long*)&arg); }
#else
#define CLOSE close
#define SHUTDOWN(s) shutdown(s,SHUT_RDWR)
-#define IOCTLSETNONBLOCKINGSOCKET(s, arg) ioctl(s, FIONBIO, (int*)(arg))
+#define IOCTLSETNONBLOCKINGSOCKET(s, a) {int arg = (a); ioctl(s, FIONBIO, (int*)&arg); }
#endif
#ifdef WIN32