Fedora9, g++ 4.3 fixes; added MySQL to build

This commit is contained in:
Aleksandar Fabijanic
2008-09-20 23:00:38 +00:00
parent ce1fdf87fd
commit 76abe98d0f
7 changed files with 21 additions and 12 deletions

View File

@@ -8,8 +8,8 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
SYSLIBS += -L/usr/local/lib/mysql SYSLIBS += -L/usr/local/lib/mysql -L/usr/lib/mysql
INCLUDE += -I/usr/local/include/mysql/ INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql
SYSFLAGS += -DTHREADSAFE -DNO_TCL SYSFLAGS += -DTHREADSAFE -DNO_TCL
objects = Binder Extractor SessionImpl Connector \ objects = Binder Extractor SessionImpl Connector \

View File

@@ -36,7 +36,7 @@
#include "Poco/Data/MySQL/ResultMetadata.h" #include "Poco/Data/MySQL/ResultMetadata.h"
#include "Poco/Data/MySQL/MySQLException.h" #include "Poco/Data/MySQL/MySQLException.h"
#include <cstring>
namespace namespace
{ {
@@ -227,7 +227,7 @@ void ResultMetadata::init(MYSQL_STMT* stmt)
for (size_t i = 0; i < count; i++) for (size_t i = 0; i < count; i++)
{ {
memset(&_row[i], 0, sizeof(MYSQL_BIND)); std::memset(&_row[i], 0, sizeof(MYSQL_BIND));
_row[i].buffer_type = fields[i].type; _row[i].buffer_type = fields[i].type;
_row[i].buffer_length = static_cast<unsigned int>(_columns[i].length()); _row[i].buffer_length = static_cast<unsigned int>(_columns[i].length());

View File

@@ -35,6 +35,7 @@
#include "Poco/Data/MySQL/SessionHandle.h" #include "Poco/Data/MySQL/SessionHandle.h"
#include <cstring>
namespace Poco { namespace Poco {
@@ -103,7 +104,7 @@ void SessionHandle::close()
void SessionHandle::query(const char* str) void SessionHandle::query(const char* str)
{ {
int res = mysql_real_query(h, str, static_cast<unsigned long>(strlen(str))); int res = mysql_real_query(h, str, static_cast<unsigned long>(std::strlen(str)));
if (res != 0) if (res != 0)
{ {

View File

@@ -8,8 +8,8 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
INCLUDE += -I./../include -I/usr/local/include/mysql INCLUDE += -I./../include -I/usr/local/include/mysql -I/usr/include/mysql
SYSLIBS += -L/usr/local/lib/mysql -lmysqlclient -lz SYSLIBS += -L/usr/local/lib/mysql -L/usr/lib/mysql -lmysqlclient -lz
objects = MySQLTestSuite Driver \ objects = MySQLTestSuite Driver \
MySQLTest SQLExecutor MySQLTest SQLExecutor

View File

@@ -36,6 +36,7 @@
#include "Poco/Environment_UNIX.h" #include "Poco/Environment_UNIX.h"
#include "Poco/Exception.h" #include "Poco/Exception.h"
#include <cstring>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/utsname.h> #include <sys/utsname.h>
@@ -188,7 +189,7 @@ void EnvironmentImpl::nodeIdImpl(NodeId& id)
int s = socket(PF_INET, SOCK_DGRAM, 0); int s = socket(PF_INET, SOCK_DGRAM, 0);
if (s == -1) throw SystemException("cannot open socket"); if (s == -1) throw SystemException("cannot open socket");
strcpy(ifr.ifr_name, "eth0"); std::strcpy(ifr.ifr_name, "eth0");
int rc = ioctl(s, SIOCGIFHWADDR, &ifr); int rc = ioctl(s, SIOCGIFHWADDR, &ifr);
close(s); close(s);
if (rc < 0) throw SystemException("cannot get MAC address"); if (rc < 0) throw SystemException("cannot get MAC address");

View File

@@ -44,12 +44,12 @@ install: libexecs
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \; find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \; find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
.PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec .PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
.PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests .PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
.PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples .PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
Foundation-libexec: Foundation-libexec:
@@ -118,6 +118,12 @@ Data/ODBC-libexec: Foundation-libexec Data-libexec
Data/ODBC-tests: Data/ODBC-libexec cppunit Data/ODBC-tests: Data/ODBC-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite $(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite
Data/MySQL-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/MySQL
Data/MySQL-tests: Data/ODBC-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite
clean: clean:
$(MAKE) -C $(POCO_BASE)/Foundation clean $(MAKE) -C $(POCO_BASE)/Foundation clean
$(MAKE) -C $(POCO_BASE)/Foundation/testsuite clean $(MAKE) -C $(POCO_BASE)/Foundation/testsuite clean

View File

@@ -6,4 +6,5 @@ NetSSL_OpenSSL
Data Data
Data/ODBC Data/ODBC
Data/SQLite Data/SQLite
Data/MySQL
CppUnit CppUnit