cvs: php4 / build-defs.h.in configure.in /ext/standard rand.c /main main.c

From: Date: Tue, 18 Jul 2000 11:02:29 +0000
Subject: cvs: php4 / build-defs.h.in configure.in /ext/standard rand.c /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-800@lists.php.net to get a copy of this message
ssb Tue Jul 18 04:02:29 2000 EDT Modified files: /php4 build-defs.h.in configure.in /php4/ext/standard rand.c /php4/main main.c Log: @Set default include_path so PEAR files can be reached (Stig) Index: php4/build-defs.h.in diff -u php4/build-defs.h.in:1.13 php4/build-defs.h.in:1.14 --- php4/build-defs.h.in:1.13 Mon May 8 03:04:12 2000 +++ php4/build-defs.h.in Tue Jul 18 04:02:28 2000 @@ -88,3 +88,4 @@ #define PHP_VELOCIS_INCLUDE "" #define PHP_VELOCIS_LIBS "" #define PHP_EXTENSION_DIR "@EXTENSION_DIR@" +#define PHP_INCLUDE_PATH "@INCLUDE_PATH@" Index: php4/configure.in diff -u php4/configure.in:1.158 php4/configure.in:1.159 --- php4/configure.in:1.158 Mon Jul 10 02:10:40 2000 +++ php4/configure.in Tue Jul 18 04:02:28 2000 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.158 2000/07/10 09:10:40 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.159 2000/07/18 11:02:28 ssb Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -665,6 +665,9 @@ EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO" +PEAR_INSTALLDIR="$prefix/lib/php" +INCLUDE_PATH=".:$PEAR_INSTALLDIR" + AC_BUILD_RPATH EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" @@ -702,6 +705,7 @@ PHP_SUBST(EXTRA_LDFLAGS) PHP_SUBST(EXTRA_LIBS) PHP_SUBST(INCLUDES) +PHP_SUBST(INCLUDE_PATH) PHP_SUBST(INSTALL_IT) PHP_SUBST(LEX) PHP_SUBST(LEX_OUTPUT_ROOT) @@ -710,6 +714,7 @@ PHP_SUBST(LN_S) PHP_SUBST(NATIVE_RPATHS) PHP_SUBST(PEAR_DIR) +PHP_SUBST(PEAR_INSTALLDIR) PHP_SUBST(PHP_BUILD_DATE) PHP_SUBST(PHP_COMPILE) PHP_SUBST(PHP_LDFLAGS) Index: php4/ext/standard/rand.c diff -u php4/ext/standard/rand.c:1.20 php4/ext/standard/rand.c:1.21 --- php4/ext/standard/rand.c:1.20 Tue Jun 13 09:31:57 2000 +++ php4/ext/standard/rand.c Tue Jul 18 04:02:28 2000 @@ -19,7 +19,7 @@ | Based on code from: Shawn Cokus <Cokus@math.washington.edu> | +----------------------------------------------------------------------+ */ -/* $Id: rand.c,v 1.20 2000/06/13 16:31:57 sas Exp $ */ +/* $Id: rand.c,v 1.21 2000/07/18 11:02:28 ssb Exp $ */ #include <stdlib.h> @@ -262,16 +262,16 @@ return_value->value.lval = rand(); #endif #endif - /* - * A bit of tricky math here. We want to avoid using a modulus because - * that simply tosses the high-order bits and might skew the distribution - * of random values over the range. Instead we map the range directly. - * - * We need to map the range from 0...M evenly to the range a...b + /* + * A bit of tricky math here. We want to avoid using a modulus because + * that simply tosses the high-order bits and might skew the distribution + * of random values over the range. Instead we map the range directly. + * + * We need to map the range from 0...M evenly to the range a...b * Let n = the random number and n' = the mapped random number - * + * * Then we have: n' = a + n(b-a)/M - * + * * We have a problem here in that only n==M will get mapped to b which # means the chances of getting b is much much less than getting any of # the other values in the range. We can fix this by increasing our range @@ -279,7 +279,7 @@ # # n' = a + n(b-a+1)/M * - # Now we only have a problem if n==M which would cause us to produce a + # Now we only have a problem if n==M which would cause us to produce a # number of b+1 which would be bad. So we bump M up by one to make sure # this will never happen, and the final algorithm looks like this: # Index: php4/main/main.c diff -u php4/main/main.c:1.282 php4/main/main.c:1.283 --- php4/main/main.c:1.282 Thu Jul 13 10:52:00 2000 +++ php4/main/main.c Tue Jul 18 04:02:28 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.282 2000/07/13 17:52:00 zeev Exp $ */ +/* $Id: main.c,v 1.283 2000/07/18 11:02:28 ssb Exp $ */ #include <stdio.h> @@ -237,7 +237,7 @@ STD_PHP_INI_ENTRY("error_log", NULL, PHP_INI_ALL, OnUpdateString, error_log, php_core_globals, core_globals) STD_PHP_INI_ENTRY("extension_dir", PHP_EXTENSION_DIR, PHP_INI_SYSTEM, OnUpdateStringUnempty, extension_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY("gpc_order", "GPC", PHP_INI_ALL, OnUpdateStringUnempty, gpc_order, php_core_globals, core_globals) - STD_PHP_INI_ENTRY("include_path", NULL, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("include_path", PHP_INCLUDE_PATH, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) PHP_INI_ENTRY("max_execution_time", "30", PHP_INI_ALL, OnUpdateTimeout) STD_PHP_INI_ENTRY("open_basedir", NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, open_basedir, php_core_globals, core_globals) STD_PHP_INI_ENTRY("safe_mode_exec_dir", "1", PHP_INI_SYSTEM, OnUpdateString, safe_mode_exec_dir, php_core_globals, core_globals)

« previous php.cvs (#800) next »