Bug 67710

Summary: PHP 4.3.7 wont compile with FreeTDS MsSQL extension [RESEND]
Product: Ports & Packages Reporter: Henry Karpatskij <henkka>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Henry Karpatskij 2004-06-08 10:30:32 UTC
        PHP compile process fails as described in <http://bugs.php.net/bug.php?id=28626>

	Ob: I'm resending this one with a proper email address (sorry about that)

Fix: Add the following files to the lang/php4/files directory and recompile PHP.

------------------------------------------------------------
patch-ext::mssql::php_mssql.h
------------------------------------------------------------

-/* $Id: php_mssql.h,v 1.23.4.10 2004/04/20 23:37:26 fmk Exp $ */
+/* $Id: php_mssql.h,v 1.23.4.11 2004/06/04 01:02:21 pollita Exp $ */

 #ifndef PHP_MSSQL_H
 #define PHP_MSSQL_H
@@ -37,9 +37,7 @@
 #include "sqldb.h"

 #if HAVE_FREETDS
-#ifndef SHORT
-typedef short SHORT;
-#endif
+typedef short TDS_SHORT;
 #define SQLTEXT SYBTEXT
 #define SQLCHAR SYBCHAR
 #define SQLVARCHAR SYBVARCHAR

------------------------------------------------------------
patch-ext::mssql::php_mssql.c
------------------------------------------------------------



-/* $Id: php_mssql.c,v 1.86.2.32 2004/04/20 23:31:39 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.86.2.33 2004/06/04 01:02:21 pollita Exp $ */

 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -336,7 +336,7 @@
        dbsetlogintime(MS_SQL_G(connect_timeout));
        if (MS_SQL_G(timeout) < 0) MS_SQL_G(timeout) = 60;
        dbsettime(MS_SQL_G(timeout));
-       dbsetmaxprocs((SHORT)MS_SQL_G(max_procs));
+       dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs));

        return SUCCESS;
 }--KGZKuKBGDjPKyHwOsOt7eP3jJD1LUO18Le54fT42NSWmudWZ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- ext/mssql/php_mssql.h.orig  Tue Jun  8 11:24:27 2004
+++ ext/mssql/php_mssql.h       Tue Jun  8 11:23:39 2004
@@ -17,7 +17,7 @@
  */
How-To-Repeat:         Just compile PHP with FreeTDS MsSQL support.
Comment 1 Clement Laforet freebsd_committer freebsd_triage 2004-06-08 13:50:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 2 henry.karpatskij 2004-06-08 14:14:16 UTC
I forgot to mention that the error will most likely go away in the next 
release, since this one was fixed in PHP CVS after the 4.3.7 release.

And sorry again about the duplicate, this is my first time sending PR's 
and I'm feeling a little frantic or something.

-- 
Henry Karpatskij                                        Airport Plaza
Järjestelmäkehittäjä                                     Äyritie 12 C
HairIT <http://www.hairit.fi/>                           01510 Vantaa
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2004-06-08 14:26:18 UTC
State Changed
From-To: open->closed

Committed, thanks!