Author: glen                         Date: Sun Oct 31 15:41:43 2010 GMT
Module: packages                      Tag: PHP_5_2
---- Log message:
- backport extension loading from 5.3, allows loading permanent modules with 
full path

---- Files affected:
packages/php:
   php.spec (1.805.2.73 -> 1.805.2.74) , php-php_dl.patch (NONE -> 1.1.2.1)  
(NEW)

---- Diffs:

================================================================
Index: packages/php/php.spec
diff -u packages/php/php.spec:1.805.2.73 packages/php/php.spec:1.805.2.74
--- packages/php/php.spec:1.805.2.73    Fri Oct 22 21:32:39 2010
+++ packages/php/php.spec       Sun Oct 31 16:41:37 2010
@@ -113,7 +113,7 @@
 Summary(uk.UTF-8):     PHP Версії 5 - мова препроцесування HTML-файлів, 
виконувана на сервері
 Name:          php
 Version:       5.2.14
-Release:       4
+Release:       5
 Epoch:         4
 License:       PHP
 Group:         Libraries
@@ -189,6 +189,7 @@
 Patch53:       %{name}-gmp.patch
 Patch54:       fix-test-run.patch
 Patch55:       %{name}-krb5.patch
+Patch56:       php-php_dl.patch
 URL:           http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel 
>= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -1863,6 +1864,7 @@
 %patch53 -p1
 %patch54 -p1
 %patch55 -p1
+%patch56 -p1
 
 # conflict seems to be resolved by recode patches
 rm -f ext/recode/config9.m4
@@ -3166,6 +3168,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.805.2.74  2010/10/31 15:41:37  glen
+- backport extension loading from 5.3, allows loading permanent modules with 
full path
+
 Revision 1.805.2.73  2010/10/22 19:32:39  arekm
 - rel 4; fix heimdal build
 

================================================================
Index: packages/php/php-php_dl.patch
diff -u /dev/null packages/php/php-php_dl.patch:1.1.2.1
--- /dev/null   Sun Oct 31 16:41:43 2010
+++ packages/php/php-php_dl.patch       Sun Oct 31 16:41:37 2010
@@ -0,0 +1,49 @@
+backport extension loading from 5.3
+
+this allows to load permanent modules with full path (eases make test code)
+
+--- php-5.2.14/ext/standard/dl.c~      2010-10-31 17:07:21.000000000 +0200
++++ php-5.2.14/ext/standard/dl.c       2010-10-31 17:27:21.409467169 +0200
+@@ -114,6 +114,7 @@
+       zend_module_entry *(*get_module)(void);
+       int error_type;
+       char *extension_dir;
++      char *filename = Z_STRVAL_P(file);
+ 
+       if (type == MODULE_PERSISTENT) {
+               extension_dir = INI_STR("extension_dir");
+@@ -127,23 +128,24 @@
+               error_type = E_CORE_WARNING;
+       }
+ 
+-      if (extension_dir && extension_dir[0]){
+-              int extension_dir_len = strlen(extension_dir);
+-
++      /* Check if passed filename contains directory separators */
++      if (strchr(filename, '/') != NULL || strchr(filename, DEFAULT_SLASH) != 
NULL) {
++              /* Passing modules with full path is not supported for 
dynamically loaded extensions */
+               if (type == MODULE_TEMPORARY) {
+-                      if (strchr(Z_STRVAL_P(file), '/') != NULL || 
strchr(Z_STRVAL_P(file), DEFAULT_SLASH) != NULL) {
+-                              php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Temporary module name should contain only filename");
+-                              RETURN_FALSE;
+-                      }
++                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "Temporary 
module name should contain only filename");
++                      return FAILURE;
+               }
++              libpath = estrdup(filename);
++      } else if (extension_dir && extension_dir[0]) {
++              int extension_dir_len = strlen(extension_dir);
+ 
+               if (IS_SLASH(extension_dir[extension_dir_len-1])) {
+-                      spprintf(&libpath, 0, "%s%s", extension_dir, 
Z_STRVAL_P(file));
++                      spprintf(&libpath, 0, "%s%s", extension_dir, filename); 
/* SAFE */
+               } else {
+-                      spprintf(&libpath, 0, "%s%c%s", extension_dir, 
DEFAULT_SLASH, Z_STRVAL_P(file));
++                      spprintf(&libpath, 0, "%s%c%s", extension_dir, 
DEFAULT_SLASH, filename); /* SAFE */
+               }
+       } else {
+-              libpath = estrndup(Z_STRVAL_P(file), Z_STRLEN_P(file));
++              return FAILURE; /* Not full path given or extension_dir is not 
set */
+       }
+ 
+       /* load dynamic symbol */
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/php.spec?r1=1.805.2.73&r2=1.805.2.74&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to