summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-04 23:19:23 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-04 23:19:23 (GMT)
commita4e75d587fb6a256da5584328b3dd84a185b5640 (patch)
tree0df2b0aa7b090259665b4d58a3a2e8c0ab2c8c17 /src
parent73fe68a3eb336bac2b76c70ec659bb0fd10df8c1 (diff)
downloadpowder-a4e75d587fb6a256da5584328b3dd84a185b5640.zip
powder-a4e75d587fb6a256da5584328b3dd84a185b5640.tar.gz
add #ifdef WIN / #idndef WIN around some lua socket files, for easier visual studio compatibility
Diffstat (limited to 'src')
-rw-r--r--src/socket/unix.c2
-rw-r--r--src/socket/unix.h2
-rw-r--r--src/socket/usocket.c2
-rw-r--r--src/socket/usocket.h2
-rw-r--r--src/socket/wsocket.c2
-rw-r--r--src/socket/wsocket.h2
6 files changed, 12 insertions, 0 deletions
diff --git a/src/socket/unix.c b/src/socket/unix.c
index 158d319..048630f 100644
--- a/src/socket/unix.c
+++ b/src/socket/unix.c
@@ -1,3 +1,4 @@
+#ifndef WIN
/*=========================================================================*\
* Unix domain socket
* LuaSocket toolkit
@@ -354,3 +355,4 @@ static int global_create(lua_State *L) {
return 2;
}
}
+#endif
diff --git a/src/socket/unix.h b/src/socket/unix.h
index 32b7380..f3b543e 100644
--- a/src/socket/unix.h
+++ b/src/socket/unix.h
@@ -1,3 +1,4 @@
+#ifndef WIN
#ifndef UNIX_H
#define UNIX_H
/*=========================================================================*\
@@ -26,3 +27,4 @@ typedef t_unix *p_unix;
int luaopen_socket_unix(lua_State *L);
#endif /* UNIX_H */
+#endif
diff --git a/src/socket/usocket.c b/src/socket/usocket.c
index 70c6e1e..f206cad 100644
--- a/src/socket/usocket.c
+++ b/src/socket/usocket.c
@@ -1,3 +1,4 @@
+#ifndef WIN
/*=========================================================================*\
* Socket compatibilization module for Unix
* LuaSocket toolkit
@@ -368,3 +369,4 @@ const char *socket_ioerror(p_socket ps, int err) {
(void) ps;
return socket_strerror(err);
}
+#endif
diff --git a/src/socket/usocket.h b/src/socket/usocket.h
index f2a89aa..918c664 100644
--- a/src/socket/usocket.h
+++ b/src/socket/usocket.h
@@ -1,3 +1,4 @@
+#ifndef WIN
#ifndef USOCKET_H
#define USOCKET_H
/*=========================================================================*\
@@ -38,3 +39,4 @@ typedef t_socket *p_socket;
#define SOCKET_INVALID (-1)
#endif /* USOCKET_H */
+#endif
diff --git a/src/socket/wsocket.c b/src/socket/wsocket.c
index 6022565..037f43a 100644
--- a/src/socket/wsocket.c
+++ b/src/socket/wsocket.c
@@ -1,3 +1,4 @@
+#ifdef WIN
/*=========================================================================*\
* Socket compatibilization module for Win32
* LuaSocket toolkit
@@ -399,3 +400,4 @@ static const char *wstrerror(int err) {
default: return "Unknown error";
}
}
+#endif
diff --git a/src/socket/wsocket.h b/src/socket/wsocket.h
index b536683..963742f 100644
--- a/src/socket/wsocket.h
+++ b/src/socket/wsocket.h
@@ -1,3 +1,4 @@
+#ifdef WIN
#ifndef WSOCKET_H
#define WSOCKET_H
/*=========================================================================*\
@@ -19,3 +20,4 @@ typedef t_socket *p_socket;
#define SOCKET_INVALID (INVALID_SOCKET)
#endif /* WSOCKET_H */
+#endif