Re: New PHP_MANDIR constant breaks Win32 build.
| From: | Richard Quadling | Date: | Mon, 18 Apr 2011 14:58:06 +0000 |
| Subject: | Re: New PHP_MANDIR constant breaks Win32 build. | ||
| References: | 1 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-781@lists.php.net to get a copy of this message | ||
On 18 April 2011 15:01, Richard Quadling <rquadling@gmail.com> wrote:
> On 18 April 2011 10:50, Hannes Magnusson <bjori@php.net> wrote:
>> bjori Mon, 18 Apr 2011 09:50:32 +0000
>>
>> Revision:
>> http://svn.php.net/viewvc?view=revision&revision=310307
>>
>> Log:
>> Expose PHP_MANDIR
>> Useful for apps (like the pear installer, phd, .. etc) to install their manpages into the
>> same dir as php did :]
>>
>> Changed paths:
>> U php/php-src/branches/PHP_5_3/NEWS
>> U php/php-src/branches/PHP_5_3/configure.in
>> U php/php-src/branches/PHP_5_3/main/build-defs.h.in
>> U php/php-src/branches/PHP_5_3/main/main.c
>> U php/php-src/trunk/configure.in
>> U php/php-src/trunk/main/build-defs.h.in
>> U php/php-src/trunk/main/main.c
>> U phpdoc/en/trunk/appendices/reserved.constants.core..xml
>
> [SNIP]
>
> Win32build now fails due to the lack of PHP_MANDIR
>
> main\main.c(1598) : warning C4018: '<' : signed/unsigned mismatch
> main\main.c(1941) : error C2065: 'PHP_MANDIR' : undeclared identifier
> main\main.c(1941) : warning C4047: 'function' : 'char *' differs in
> levels of indirection from 'int'
> main\main.c(1941) : warning C4024: 'zend_register_stringl_constant' :
> different types for formal and actual parameter 3
> main\main.c(1941) : error C2065: 'PHP_MANDIR' : undeclared identifier
>
> I'm guessing that man would only be of use to non win32 builds?
>
> Wrapping line 1941 with (branch/PHP5_3/main/main.c) ...
>
> #if !defined(PHP_WIN32)
> REGISTER_MAIN_STRINGL_CONSTANT("PHP_MANDIR", PHP_MANDIR,
> sizeof(PHP_MANDIR)-1, CONST_PERSISTENT | CONST_CS);
> #endif
>
> allows the build to go through for me.
>
>
> Regards,
>
> Richard.
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>
Considering many of the other constants are defined as @PREFIX@, maybe
this branch/PHP5_3 patch is what is needed.
Index: win32/build/config.w32.h.in
===================================================================
--- win32/build/config.w32.h.in (revision 310314)
+++ win32/build/config.w32.h.in (working copy)
@@ -21,6 +21,7 @@
#define PHP_LOCALSTATEDIR "@PREFIX@"
#define PHP_PREFIX "@PREFIX@"
#define PHP_SYSCONFDIR "@PREFIX@"
+#define PHP_MANDIR "@PREFIX@"
/* Enable / Disable crypt() function (default: enabled) */
#define HAVE_CRYPT 1
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY