#39130 [NEW]: Compile failure with the compiler of VC++ 2005
From: ben dot yan at msn dot com
Operating system: Windows
PHP version: 5.2.0RC5
PHP Bug Type: Compile Failure
Bug description: Compile failure with the compiler of VC++ 2005
Description:
------------
Compile with VS.NET 2005
c:\program files\microsoft visual studio 8\vc\include\sys\stat.inl(44) :
error C2466: cannot allocate an array of constant size 0
c:\program files\microsoft visual studio 8\vc\include\sys\stat.inl(49) :
error C2466: cannot allocate an array of constant size 0
c:\program files\microsoft visual studio 8\vc\include\sys\utime.inl(39) :
error C2466: cannot allocate an array of constant size 0
c:\program files\microsoft visual studio 8\vc\include\sys\utime.inl(44) :
error C2466: cannot allocate an array of constant size 0
c:\program files\microsoft visual studio 8\vc\include\sys\utime.inl(49) :
error C2466: cannot allocate an array of constant size 0
c:\program files\microsoft visual studio 8\vc\include\sys\utime.inl(78) :
error C2466: cannot allocate an array of constant size 0
Reproduce code:
---------------
look the zend.h :
...
#include <stdio.h>
/*
* general definitions
*/
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(XXX)
...
#endif
Expected result:
----------------
Look the line 151 at the <../main/config.w32.h>:
/* vs.net 2005 has a 64-bit time_t. This will likely break
* 3rdParty libs that were built with older compilers; switch
* back to 32-bit */
#define _USE_32BIT_TIME_T 1
#define HAVE_STDLIB_H 1
so the config.w32.h should be included first. But it isn't so in the
zend.h:
#include <stdio.h>
/*
* general definitions
*/
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(XXX)
...
#endif
This would induce the compile error. and if
#include <stdio.h>
BEHIND the
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(XXX)
...
#endif
,it will be ok.
Actual result:
--------------
error C2466: cannot allocate an array of constant size 0
--
Edit bug report at http://bugs.php.net/?id=39130&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39130&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39130&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39130&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39130&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39130&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39130&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39130&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39130&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39130&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39130&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39130&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39130&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39130&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39130&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39130&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39130&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39130&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39130&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39130&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39130&r=mysqlcfg
Thread (23 messages)
- ben dot yan at msn dot com
- tony2001@php.net#39130 [Opn->Asn]: Compile failure with the compiler of VC++ 2005
- edink@php.net#39130 [Asn]: Compile failure with the compiler of VC++ 2005
- wez@php.net#39130 [Asn]: Compile failure with the compiler of VC++ 2005
- sailormax at inbox dot lv#39130 [Com]: Compile failure with the compiler of VC++ 2005
- iliaa@php.net#39130 [Asn->Fbk]: Compile failure with the compiler of VC++ 2005
- dmain at themainfamily dot net#39130 [Com]: Compile failure with the compiler of VC++ 2005
- dmain at themainfamily dot net#39130 [Com]: Compile failure with the compiler of VC++ 2005
- ben dot yan at msn dot com#39130 [NoF->Opn]: Compile failure with the compiler of VC++ 2005
- sniper@php.net#39130 [Opn->Asn]: Compile failure with the compiler of VC++ 2005
- cxd at webpan dot com#39130 [Com]: Compile failure with the compiler of VC++ 2005
- grotaiche at hotmail dot com#39130 [Com]: Compile failure with the compiler of VC++ 2005
- jani@php.net#39130 [Asn->Fbk]: Compile failure with the compiler of VC++ 2005
- ben dot yan at msn dot com#39130 [NoF->Opn]: Compile failure with the compiler of VC++ 2005
- jani@php.net#39130 [Opn->Asn]: Compile failure when using VC++ 2005
- someone at farpost dot com#39130 [Com]: Compile failure when using VC++ 2005
- someone at farpost dot com#39130 [Com]: Compile failure when using VC++ 2005
- pajoye@php.net#39130 [Asn->Fbk]: Compile failure when using VC++ 2005
- jmckenna at gatewaygeomatics dot com#39130 [Com]: Compile failure when using VC++ 2005
- pajoye@php.net#39130 [NoF->WFx]: Compile failure when using VC++ 2005
- josephmdaly at gmail dot comBug #39130 [Com]: Compile failure when using VC++ 2005
- gospodin dot p dot zh at gmail dot comBug #39130 [Com]: Compile failure when using VC++ 2005
- pajoye@php.netBug #39130 [Wfx]: Compile failure when using VC++ 2005