]> granicus.if.org Git - php/commitdiff
@Set default include_path so PEAR files can be reached (Stig)
authorStig Bakken <ssb@php.net>
Tue, 18 Jul 2000 11:02:28 +0000 (11:02 +0000)
committerStig Bakken <ssb@php.net>
Tue, 18 Jul 2000 11:02:28 +0000 (11:02 +0000)
build-defs.h.in
configure.in
ext/standard/rand.c
main/main.c

index f8a94e1fb207ee645155e3390147d4340abfa469..78e365e625e0d126cc6bb67679f87339d73091df 100644 (file)
@@ -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 c3dcf12f1f4afa021eedad881a1f40920eef8f1f..d10f4cb510369ac78a902c5e0ac84307989f1eba 100644 (file)
@@ -665,6 +665,9 @@ ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|s
 
 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(EXTENSION_DIR)
 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(LIBTOOL)
 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 9766ecfcb3d02df5a41f10166be40ec42064ae14..0413e31269d56d3abb44d3fa79b64bc3d45a3c6c 100644 (file)
@@ -262,16 +262,16 @@ PHP_FUNCTION(rand)
        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 @@ PHP_FUNCTION(rand)
      #
      #               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 3330f63ca5cb63c24a70831df64386e9c3f00c38..f72083bea826e5b233898132033abebd14d733ab 100644 (file)
@@ -237,7 +237,7 @@ PHP_INI_BEGIN()
        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)