php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29020 Compiling with FreeTDS failure
Submitted: 2004-07-05 19:59 UTC Modified: 2004-07-06 01:58 UTC
From: mb at netlogic dot ru Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.7 OS: FreeBSD
Private report: No CVE-ID: None
 [2004-07-05 19:59 UTC] 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 *, ...);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-06 01:58 UTC] sniper@php.net
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.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 09 18:00:02 2025 UTC