ID: 39130 Comment by: grotaiche at hotmail dot com Reported By: ben dot yan at msn dot com Status: Assigned Bug Type: Compile Failure Operating System: Windows PHP Version: 5.2.2 Assigned To: wez New Comment:
Yeah, I have the same problem too. I recompile my extension with VS 2005 for every PHP release and I have had the problem for a while. Commenting the #define _USE_32BIT_TIME_T 1 line is not very difficult but it is a by-pass ; a more viable solution would be appreciated :) Thanks ! Previous Comments: ------------------------------------------------------------------------ [2007-06-02 10:52:53] cxd at webpan dot com Trying to compile a module for PHP 5.2.3 with VC++ 2005 SP1 I also get tons of error like: error C2466: cannot allocate an array of constant size 0 This module (eAccelerator for Windows) compiled fine with VC++ 2005 SP1 and PHP 5.2.2. The following might explain the cause of the problem (not sure?) that was (re)introduced with 523( again my module compiles great with PHP 522 & VC++ 2005): ---------------------------------- deprecated "default to int" rule: Pre-standard C++ (and all C variants predating C99), use the "default to int" rule when declarations of functions and variables do not contain an explicit datatype. This behavior is maintained in Visual C++ 6.0 as the following declarations show: const x=0; //implicit int static num; // implicit int myfunc(void *ptr); //implicit return type int In Visual Studio 2005, you have to specify the datatype explicitly: const int x=0; static int num; int myfunc(void *ptr); -------------------- Hope this helps... ------------------------------------------------------------------------ [2007-05-19 18:24:06] [EMAIL PROTECTED] Wez, you never got to the company laptop..? Or was it stolen? :D ------------------------------------------------------------------------ [2007-05-16 04:04:44] ben dot yan at msn dot com I tried PHP5.2.2, but the problem is still there. :( ------------------------------------------------------------------------ [2007-04-14 05:00:20] dmain at themainfamily dot net If I move this change, then the compiler errors are gone. I still have another separate issue with compilation though. 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. ------------------------------------------------------------------------ [2007-04-14 04:53:41] dmain at themainfamily dot net This is my output when compiling a simple dll extension using the sample source code in the online documentation. 1>------ Build started: Project: Win32_SystemCalls, Configuration: Release_TS Win32 ------ 1>Compiling... 1>Source1.c 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\sys/stat.inl(44) : error C2466: cannot allocate an array of constant size 0 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\sys/stat.inl(49) : error C2466: cannot allocate an array of constant size 0 1>c:\projects\phpextensions\php-5.2.1\tsrm\tsrm_config_common.h(4) : fatal error C1017: invalid integer constant expression 1>Build log was saved at "file://c:\Projects\PhpExtensions\php-5.2.1\ext\Win32_SystemCalls\Release_TS\BuildLog.htm" 1>Win32_SystemCalls - 3 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39130 -- Edit this bug report at http://bugs.php.net/?id=39130&edit=1