summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryazoo <yazoo>2007-04-14 00:26:09 +0000
committeryazoo <yazoo>2007-04-14 00:26:09 +0000
commit9cfe7c26d1819a7cdbeb177079753de50fee8064 (patch)
tree308faf7b555112ed15a60e8b55cbcbace9df676d
parent164c940ee8cef74bf483ab3ecc8848c25721a29d (diff)
MySQL under windows needs winsock.h
-rw-r--r--lib/LuaSQL.cc9
-rw-r--r--lib/SQL.cc9
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/LuaSQL.cc b/lib/LuaSQL.cc
index 8e69ebb..02ee103 100644
--- a/lib/LuaSQL.cc
+++ b/lib/LuaSQL.cc
@@ -1,3 +1,6 @@
+#ifdef _WIN32
+#include <winsock.h>
+#endif
#include <mysql.h>
#include "LuaSQL.h"
@@ -96,9 +99,9 @@ int sLua_SQLConnection::SQLConnection_proceed(Lua * L, int n, SQLConnection * c,
case SQLCONNECTION_INSERTID:
L->push((lua_Number) c->insertid());
break;
- case SQLCONNECTION_ERRNO:
- L->push((lua_Number) c->errno());
- break;
+// case SQLCONNECTION_ERRNO:
+// L->push((lua_Number) c->errno());
+// break;
case SQLCONNECTION_ERROR:
L->push(c->error());
break;
diff --git a/lib/SQL.cc b/lib/SQL.cc
index 35b005d..6ce606c 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -3,6 +3,9 @@
#endif
#ifdef HAVE_MYSQL
+#ifdef _WIN32
+#include <winsock.h>
+#endif
#include "SQL.h"
@@ -91,9 +94,9 @@ int SQLConnection::insertid() {
return ii;
}
-int SQLConnection::errno() {
- return mysql_errno(&con);
-}
+//int SQLConnection::errno() {
+// return mysql_errno(&con);
+//}
String SQLConnection::error() {
return mysql_error(&con);