From b56bc0a5e8f802e65e522e9623fa4568a16f37ae Mon Sep 17 00:00:00 2001 From: perky Date: Thu, 5 May 2005 08:47:45 +0000 Subject: Fix build for the recent freetds library and unmark BROKEN. --- databases/py-mssql/Makefile | 2 -- databases/py-mssql/files/patch-mssqldbmodule.c | 42 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 databases/py-mssql/files/patch-mssqldbmodule.c (limited to 'databases/py-mssql') diff --git a/databases/py-mssql/Makefile b/databases/py-mssql/Makefile index 2b60bf4f7033..3c4ba82e14de 100644 --- a/databases/py-mssql/Makefile +++ b/databases/py-mssql/Makefile @@ -19,8 +19,6 @@ COMMENT= Python database interface for simple MS-SQL access LIB_DEPENDS= sybdb.5:${PORTSDIR}/databases/freetds-msdblib -BROKEN= Does not compile - USE_PYTHON= yes USE_PYDISTUTILS=yes USE_REINPLACE= yes diff --git a/databases/py-mssql/files/patch-mssqldbmodule.c b/databases/py-mssql/files/patch-mssqldbmodule.c new file mode 100644 index 000000000000..946f3e5c6f7c --- /dev/null +++ b/databases/py-mssql/files/patch-mssqldbmodule.c @@ -0,0 +1,42 @@ +--- mssqldbmodule.c.orig Thu May 5 17:32:37 2005 ++++ mssqldbmodule.c Thu May 5 17:43:36 2005 +@@ -18,9 +18,9 @@ + #include + #include // DB-LIB header file (should always be included) + #else +- #include +- #include // DB-LIB header file (should always be included) +- #include // DB-LIB header file (should always be included) ++ #include ++ #define _FREETDS_LIBRARY_SOURCE 1 ++ #include + + #define SQLNUMERIC SYBNUMERIC + #define SQLDECIMAL SYBDECIMAL +@@ -115,7 +115,7 @@ + DBUSMALLINT line; + + { +- sprintf(_mssql_query_message,"SQL Server message %ld, state %d, severity %d:\n\t%s\n", msgno, msgstate, severity, msgtext); ++ sprintf(_mssql_query_message,"SQL Server message %ld, state %d, severity %d:\n\t%s\n", (long)msgno, msgstate, severity, msgtext); + return(0); + } + +@@ -203,7 +203,7 @@ + dberrhandle(err_handler); + dbmsghandle(msg_handler); + // Set port +- tds_set_port(login->tds_login, port); ++ //tds_set_port(login->tds_login, port); + #endif + + +@@ -757,7 +757,7 @@ + DBDATEREC di; + char strdi[25]={0,}; + dbdatecrack(dbproc, &di, (DBDATETIME*)data); +-#ifdef MS_WIN32 ++#if 1 + sprintf(strdi, "%02d-%02d-%02d %02d:%02d:%02d", + di.year, + di.month+1, -- cgit