#29020 [Opn->Csd]: Compiling with FreeTDS failure
| From: | sniper@php.net | Date: | Mon, 05 Jul 2004 23:58:16 +0000 |
| Subject: | #29020 [Opn->Csd]: Compiling with FreeTDS failure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61740@lists.php.net to get a copy of this message | ||
ID: 29020
Updated by: sniper@php.net
Reported By: mb at netlogic dot ru
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: FreeBSD
PHP Version: 4.3.7
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Should be fixed now.
Previous Comments:
------------------------------------------------------------------------
[2004-07-05 19:59:07] mb at netlogic dot ru
Description:
------------
On Linux we have following picture, when trying to compile PHP-4.3.7
with FreeTDS ...:
=======================================================
gcc -Iext/mssql/ -I/usr/src/php-4.3.7/ext/mssql/ -DPHP_ATOM_INC
-I/usr/src/php-4.3.7/include -I/usr/src/php-4.3.7/main
-I/usr/src/php-4.3.7 -I/usr/src/php-4.3.7/Zend -I/usr/local/include
-I/usr/src/php-4.3.7/ext/xml/expat -I/usr/src/php-4.3.7/TSRM -g -O2
-c /usr/src/php-4.3.7/ext/mssql/php_mssql.c -o ext/mssql/php_mssql.o
&& echo > ext/mssql/php_mssql.lo
In file included from /usr/src/php-4.3.7/ext/mssql/php_mssql.c:33:
/usr/src/php-4.3.7/ext/mssql/php_mssql.h:41: warning: redefinition of
`SHORT'
/usr/local/include/sybdb.h:103: warning: `SHORT' previously declared
here
=======================================================
But, on FreeBSD this warning became an error:
=======================================================
gcc -Iext/mssql/ -I/usr/local/src/apache-php/php-4.3.7/ext/mssql/
-DPHP_ATOM_INC -I/usr/local/src/apache-php/php-4.3.7/include
-I/usr/local/src/apache-php/php-4.3.7/main
-I/usr/local/src/apache-php/php-4.3.7
-I/usr/local/src/apache-php/php-4.3.7/Zend -I/usr/local/include
-I/usr/local/src/apache-php/php-4.3.7/ext/xml/expat
-I/usr/local/src/apache-php/php-4.3.7/TSRM -g -O2 -c
/usr/local/src/apache-php/php-4.3.7/ext/mssql/php_mssql.c -o
ext/mssql/php_mssql.o && echo > ext/mssql/php_mssql.lo
In file included from
/usr/local/src/apache-php/php-4.3.7/ext/mssql/php_mssql.c:33:
/usr/local/src/apache-php/php-4.3.7/ext/mssql/php_mssql.h:41: error:
redefinition of `SHORT'
/usr/local/include/sybdb.h:117: error: `SHORT' previously declared
here
*** Error code 1
Stop in /usr/local/src/apache-php/php-4.3.7.
=======================================================
1 platform: Debian Linux, 2.4.20 kernel, GCC 2.95.4, FreeTDS 0.61.1
2 platform: FreeBSD 5.2.1-RELEASE-p8, GCC 3.3.3, FreeTDS 0.62.3
Reproduce code:
---------------
ext/mssql/php_mssql.h:
#if HAVE_FREETDS
#ifndef SHORT
typedef short SHORT;
#endif
#define SQLTEXT SYBTEXT
#define SQLCHAR SYBCHAR
/usr/local/include/sybdb.h:
typedef void *DBVOIDPTR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef int (*INTFUNCPTR) (void *, ...);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29020&edit=1