Unless you fix the rest of the occurences of these symbolic
defines this patch (which is the same Stig commited) is a bit
problematic and will not work properly.
Take a look at
http://lxr.php.net/source/php4/main/main.c#1100
and see how PEAR_INSTALL_DIR is registered; sizeof() doesn't
work as you might expect with the CONDENV construct.
Please test before commit:
C:\cygwin\home\mfischer\isrc\cvs\php4\Debug_TS>php test.php
Warning: String is not zero-terminated (c:\php4\pear) (source:
c:\cygwin\home\mfischer\isrc\cvs\php4\zend\zend_constants .c:239) in
C:\cygwin\home\mfischer\isrc\cvs\php4\Debug_TS\test.php on line 2
string(3) "c:\"
C:\cygwin\home\mfischer\isrc\cvs\php4\Debug_TS>set PEAR_INSTALLDIR=whatever
C:\cygwin\home\mfischer\isrc\cvs\php4\Debug_TS>php test.php
Warning: String is not zero-terminated (whatever) (source:
c:\cygwin\home\mfischer\isrc\cvs\php4\zend\zend_constants.c:2 39) in
C:\cygwin\home\mfischer\isrc\cvs\php4\Debug_TS\test.php on line 2
string(3) "wha"
- Markus
On Wed, Oct 16, 2002 at 07:37:28AM -0000, Sebastian Bergmann wrote :
> sebastian Wed Oct 16 03:37:28 2002 EDT
>
> Modified files:
> /php4/main config.w32.h.in
> Log:
> Patch by Urs Gehrig <[EMAIL PROTECTED]>.
>
>
> Index: php4/main/config.w32.h.in
> diff -u php4/main/config.w32.h.in:1.17 php4/main/config.w32.h.in:1.18
> --- php4/main/config.w32.h.in:1.17 Fri Oct 11 05:20:38 2002
> +++ php4/main/config.w32.h.in Wed Oct 16 03:37:28 2002
> @@ -2,22 +2,24 @@
> Build Configuration for Win32.
> This has only been tested with MS VisualC++ 6 (and later).
>
> - $Id: config.w32.h.in,v 1.17 2002/10/11 09:20:38 edink Exp $
> + $Id: config.w32.h.in,v 1.18 2002/10/16 07:37:28 sebastian Exp $
> */
>
> +#define CONDENV(ev,def) (getenv(ev)!=NULL?getenv(ev):def)
> +
> /* Default PHP / PEAR directories */
> -#define CONFIGURATION_FILE_PATH "php.ini"
> -#define PEAR_INSTALLDIR "c:\\php4\\pear"
> -#define PHP_BINDIR "c:\\php4"
> -#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):""
> -#define PHP_CONFIG_FILE_SCAN_DIR ""
> -#define PHP_DATADIR "c:\\php4"
> -#define PHP_EXTENSION_DIR "c:\\php4"
> -#define PHP_INCLUDE_PATH ".;c:\\php4\\pear"
> -#define PHP_LIBDIR "c:\\php4"
> -#define PHP_LOCALSTATEDIR "c:\\php4"
> -#define PHP_PREFIX "c:\\php4"
> -#define PHP_SYSCONFDIR "c:\\php4"
> +#define CONFIGURATION_FILE_PATH "php.ini"
> +#define PEAR_INSTALLDIR CONDENV("PEAR_INSTALLDIR", "c:\\php4\\pear")
> +#define PHP_BINDIR CONDENV("PHP_BINDIR", "c:\\php4")
> +#define PHP_CONFIG_FILE_PATH CONDENV("SystemRoot", "")
> +#define PHP_CONFIG_FILE_SCAN_DIR CONDENV("PHP_CONFIG_FILE_SCAN_DIR", "")
> +#define PHP_DATADIR CONDENV("PHP_DATADIR", "c:\\php4")
> +#define PHP_EXTENSION_DIR "c:\\php4"
> +#define PHP_INCLUDE_PATH ".;c:\\php4\\pear"
> +#define PHP_LIBDIR CONDENV("PHP_LIBDIR", "c:\\php4")
> +#define PHP_LOCALSTATEDIR CONDENV("PHP_LOCALSTATEDIR", "c:\\php4")
> +#define PHP_PREFIX CONDENV("PHP_PREFIX", "c:\\php4")
> +#define PHP_SYSCONFDIR CONDENV("PHP_SYSCONFDIR", "c:\\php4")
>
> /* Enable / Disable BCMATH extension (default: enabled) */
> #define WITH_BCMATH 1
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
<rei_> Derick, while ($xml) $ass->get_new_ideas();
<[James]> Markus: IE on_user_fart()????
-- People doesn't seem to like the new XHTML2 specs :) --
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php