Index: includes/path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.32
diff -u -p -r1.32 path.inc
--- includes/path.inc	4 Jan 2009 20:04:32 -0000	1.32
+++ includes/path.inc	3 Apr 2009 05:18:29 -0000
@@ -46,7 +46,9 @@ function drupal_init_path() {
 function drupal_lookup_path($action, $path = '', $path_language = '') {
   global $language;
   // $map is an array with language keys, holding arrays of Drupal paths to alias relations
-  static $map = array(), $no_src = array(), $count;
+  $map = &drupal_static(__FUNCTION__, array());
+  $no_src = &drupal_static(__FUNCTION__, array());
+  $count = &drupal_static(__FUNCTION__);
 
   $path_language = $path_language ? $path_language : $language->language;
 
@@ -165,7 +167,7 @@ function drupal_get_normal_path($path, $
  *   not found.
  */
 function arg($index = NULL, $path = NULL) {
-  static $arguments;
+  $arguments = &drupal_static(__FUNCTION__);
 
   if (!isset($path)) {
     $path = $_GET['q'];
@@ -214,7 +216,7 @@ function drupal_get_title() {
  *   The updated title of the current page.
  */
 function drupal_set_title($title = NULL, $output = CHECK_PLAIN) {
-  static $stored_title;
+  $stored_title = &drupal_static(__FUNCTION__);
 
   if (isset($title)) {
     $stored_title = ($output == PASS_THROUGH) ? $title : check_plain($title);
@@ -230,7 +232,7 @@ function drupal_set_title($title = NULL,
  *   Boolean value: TRUE if the current page is the front page; FALSE if otherwise.
  */
 function drupal_is_front_page() {
-  static $is_front_page;
+  $is_front_page = &drupal_static(__FUNCTION__);
 
   if (!isset($is_front_page)) {
     // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
@@ -253,7 +255,7 @@ function drupal_is_front_page() {
  *   Boolean value: TRUE if the path matches a pattern, FALSE otherwise.
  */
 function drupal_match_path($path, $patterns) {
-  static $regexps;
+  $regexps = &drupal_static(__FUNCTION__);
 
   if (!isset($regexps[$patterns])) {
     $regexps[$patterns] = '/^(' . preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1' . preg_quote(variable_get('site_frontpage', 'node'), '/') . '\2'), preg_quote($patterns, '/')) . ')$/';
Index: includes/registry.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/registry.inc,v
retrieving revision 1.12
diff -u -p -r1.12 registry.inc
--- includes/registry.inc	22 Feb 2009 17:55:29 -0000	1.12
+++ includes/registry.inc	3 Apr 2009 05:18:29 -0000
@@ -145,7 +145,7 @@ function _registry_parse_files($files) {
  *   (optional) Weight of the module.
  */
 function _registry_parse_file($filename, $contents, $module = '', $weight = 0) {
-  static $map = array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface');
+  $map = &drupal_static(__FUNCTION__, array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface'));
   // Delete registry entries for this file, so we can insert the new resources.
   db_delete('registry')
     ->condition('filename', $filename)
@@ -207,7 +207,7 @@ function _registry_parse_file($filename,
 function _registry_get_resource_name(&$tokens = NULL, $type = NULL) {
   // Keep a running list of all resources we've saved so far, so that we never
   // save one more than once.
-  static $resources;
+  $resources = &drupal_static(__FUNCTION__);
 
   if (!isset($tokens)) {
     $resources = array();
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.67
diff -u -p -r1.67 session.inc
--- includes/session.inc	26 Feb 2009 07:30:26 -0000	1.67
+++ includes/session.inc	3 Apr 2009 05:18:29 -0000
@@ -169,7 +169,7 @@ function _sess_write($key, $value) {
  *   TRUE if session has already been started, or FALSE if it has not.
  */
 function drupal_session_start($start = TRUE) {
-  static $started = FALSE;
+  $started = &drupal_static(__FUNCTION__, FALSE);
   if ($start && !$started) {
     $started = TRUE;
     session_start();
@@ -329,7 +329,7 @@ function _sess_gc($lifetime) {
  *   FALSE if writing session data has been disabled. Otherwise, TRUE.
  */
 function drupal_save_session($status = NULL) {
-  static $save_session = TRUE;
+  $save_session = &drupal_static(__FUNCTION__, TRUE);
   if (isset($status)) {
     $save_session = $status;
   }
