A few quick hacks to get the Squirrel debugger sqdbg to compile on Linux
[supertux.git] / external / squirrel / sqdbg / sqdbgserver.cpp
index c7909c8..f7c4aac 100755 (executable)
@@ -1,9 +1,17 @@
 #include <squirrel.h>\r
 #include <assert.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <stdlib.h>\r
 #include <sqstdblob.h>\r
 #include "sqrdbg.h"\r
 #include "sqdbgserver.h"\r
 \r
+#ifndef _WIN32\r
+#  define Sleep sleep\r
+#  include <sys/types.h>\r
+#  include <sys/socket.h>\r
+#endif\r
 \r
 #ifndef _UNICODE\r
 #define scstrcpy strcpy\r
@@ -633,7 +641,7 @@ void SQDbgServer::EndDocument()
 //this can be done much better/faster(do we need that?)\r
 const SQChar *SQDbgServer::escape_xml(const SQChar *s)\r
 {\r
-       SQChar *temp=sq_getscratchpad(_v,((SQInteger)scstrlen(s)*6) + sizeof SQChar);\r
+       SQChar *temp=sq_getscratchpad(_v,((SQInteger)scstrlen(s)*6) + sizeof(SQChar));\r
        SQChar *dest=temp;\r
        while(*s!=_SC('\0')){\r
                \r
@@ -659,4 +667,4 @@ const SQChar *SQDbgServer::escape_xml(const SQChar *s)
        *dest=_SC('\0');\r
        return temp;\r
        \r
-}
\ No newline at end of file
+}\r