From:             andrew at designtek1 dot com
Operating system: FreeBSD
PHP version:      4.3.3RC4
PHP Bug Type:     Compile Failure
Bug description:  compile error when combining mime-magic with mssql

Description:
------------
compiling fails when configured with both of the options
--with-mime-magic
--with-mssql

compiler error:
In file included from /usr/local/include/sybfront.h:23,
                 from /usr/local/include/sqlfront.h:23,
                 from
/usr/ports/lang/php4/work/php-4.3.3RC4/ext/mssql/php_mssql.h:36,
                 from main/internal_functions.c:57:
/usr/local/include/sybdb.h:103: syntax error before `2'
/usr/local/include/sybdb.h:150: syntax error before `1'
/usr/local/include/sybdb.h:177: syntax error before `1'
/usr/local/include/sybdb.h:204: syntax error before `1'
/usr/local/include/sybdb.h:210: syntax error before `1'
/usr/local/include/sybdb.h:281: syntax error before `1'
/usr/local/include/sybdb.h:285: syntax error before `1'
/usr/local/include/sybdb.h:339: syntax error before `1'
/usr/local/include/sybdb.h:453: syntax error before `1'
cpp0: output pipe has been closed


i have traced this error to the fact that
"ext/mime_magic/php_mime_magic.h" has lines 61 & 62:
#define BYTE    1
#define SHORT    2

the errors from the freetds headers above refer to lines:
103:typedef short    SHORT;
150:typedef unsigned char BYTE;
177:        BYTE    *terminator;
204:        BYTE    *data;
and so on....

i was able to compile successfully by changing the order of the following
2 lines in main/internal_functions.c:

#include "ext/mime_magic/php_mime_magic.h"
#include "ext/mssql/php_mssql.h"

to

#include "ext/mssql/php_mssql.h"
#include "ext/mime_magic/php_mime_magic.h"



-- 
Edit bug report at http://bugs.php.net/?id=25155&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25155&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25155&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25155&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25155&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25155&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25155&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25155&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25155&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25155&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25155&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25155&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25155&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25155&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25155&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25155&r=gnused

Reply via email to