ID:               39130
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ben dot yan at msn dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Compile Failure
 Operating System: Windows
 PHP Version:      5.2.0RC5
-Assigned To:      
+Assigned To:      edink


Previous Comments:
------------------------------------------------------------------------

[2006-10-11 18:29:43] ben dot yan at msn dot com

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 this bug report at http://bugs.php.net/?id=39130&edit=1

Reply via email to