Re: [INTERNALS-WIN] Win32 x86 5.4-dev build failure
| From: | Pierre Joye | Date: | Fri, 19 Aug 2011 17:30:57 +0000 |
| Subject: | Re: [INTERNALS-WIN] Win32 x86 5.4-dev build failure | ||
| References: | 1 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-818@lists.php.net to get a copy of this message | ||
hi,
it is fixed already
On Fri, Aug 19, 2011 at 1:25 PM, Richard Quadling <rquadling@gmail.com> wrote:
> It seems that I'm missing ssize_t as an identifier for MSVC++2008
> Express Edition (with a service pack or 9).
>
> d:\buildphp\php_5_4\php_5_4\sapi\cli\php_http_parser.h(115) : error
> C2061: syntax error : identifier 'ssize_t'
> d:\buildphp\php_5_4\php_5_4\sapi\cli\php_http_parser.h(132) : error
> C2059: syntax error : '}'
> sapi\cli\php_http_parser.c(328) : error C2037: left of 'state'
> specifies undefined struct/union 'php_http_parser'
> sapi\cli\php_http_parser.c(329) : error C2037: left of 'header_state'
> specifies undefined struct/union 'php_http_parser'
> [snip]
> sapi\cli\php_http_parser.c(1384) : fatal error C1003: error count
> exceeds 100; stopping compilation
>
> and is first confirmed in
>
> http://windows.php.net/downloads/snaps/php-5.4/r315159/logs/make-nts-windows-vc9-x86-r315159.txt
>
> I see ssize_t is defined in
>
> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/win32/build/config..w32.h.in?view=annotate&sortdir=down#l137
> which creates main/config.w32.h.
>
> http://msdn.microsoft.com/en-us/library/aa383751(v=vs.85).aspx
> tells me ...
>
> typedef LONG_PTR SSIZE_T;
>
> And is defined in BaseTsd.h
>
> So, changing ...
>
> #include <sys/types.h>
> #if defined(_WIN32) && !defined(__MINGW32__)
> # include "win32/php_stdint.h"
> #else
> # include <stdint.h>
> #endif
>
> to ...
>
> #include <sys/types.h>
> #if defined(_WIN32) && !defined(__MINGW32__)
> # include "win32/php_stdint.h"
> # include <BaseTsd.h>
> #else
> # include <stdint.h>
> #endif
>
> and
>
> uint32_t nread;
> ssize_t content_length;
>
> to
>
> uint32_t nread;
> SSIZE_T content_length;
>
> in sapi\cli\php_http_parser.h and the build succeeds.
>
> But I'm probably missing an obvious way for this as ssize_t is used
> elsewhere without issue.
>
> Richard.
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>
> --
> Windows Internals Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org