]> git.pld-linux.org Git - packages/php.git/blobdiff - php-config-file-scan-dir.patch
- release 11 (by relup.sh)
[packages/php.git] / php-config-file-scan-dir.patch
index 0055352794330f283e6718b3d5ca0533216c597d..12d15aa59ef70d7aa1a2ebd9001f4992b39dcb4d 100644 (file)
                char ini_file[MAXPATHLEN];
 -              char *p;
 +              char *p, *last, *path_copy, *ini_path = NULL;
-               zend_file_handle fh;
+               zend_file_handle fh2;
                zend_llist scanned_ini_list;
                zend_llist_element *element;
                int l, total_l = 0;
  
 -              if ((ndir = php_scandir(php_ini_scanned_path, &namelist, 0, php_alphasort)) > 0) {
 -                      zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1);
--                      memset(&fh, 0, sizeof(fh));
+-                      memset(&fh2, 0, sizeof(fh2));
 -
 -                      for (i = 0; i < ndir; i++) {
 -
 -                              }
 -                              if (VCWD_STAT(ini_file, &sb) == 0) {
 -                                      if (S_ISREG(sb.st_mode)) {
--                                              if ((fh.handle.fp = VCWD_FOPEN(ini_file, "r"))) {
--                                                      fh.filename = ini_file;
--                                                      fh.type = ZEND_HANDLE_FP;
+-                                              if ((fh2.handle.fp = VCWD_FOPEN(ini_file, "r"))) {
+-                                                      fh2.filename = ini_file;
+-                                                      fh2.type = ZEND_HANDLE_FP;
 -
--                                                      if (zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) {
+-                                                      if (zend_parse_ini_file(&fh2, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) {
 -                                                              /* Here, add it to the list of ini files read */
 -                                                              l = strlen(ini_file);
 -                                                              total_l += l + 2;
@@ -76,7 +76,7 @@
 +                      int ini_path_len = strlen(ini_path);
 +
 +                      if ((ndir = php_scandir(ini_path, &namelist, 0, php_alphasort)) > 0) {
-+                              memset(&fh, 0, sizeof(fh));
++                              memset(&fh2, 0, sizeof(fh2));
 +
 +                              for (i = 0; i < ndir; i++) {
 +                                      /* check for any file with .ini extension */
 +                                      }                       
 +                                      if (VCWD_STAT(ini_file, &sb) == 0) {
 +                                              if (S_ISREG(sb.st_mode)) {
-+                                                      if ((fh.handle.fp = VCWD_FOPEN(ini_file, "r"))) {
-+                                                              fh.filename = ini_file;
-+                                                              fh.type = ZEND_HANDLE_FP;
++                                                      if ((fh2.handle.fp = VCWD_FOPEN(ini_file, "r"))) {
++                                                              fh2.filename = ini_file;
++                                                              fh2.type = ZEND_HANDLE_FP;
 +                                                              
 +                                                              /* Reset active ini section */
 +                                                              RESET_ACTIVE_INI_HASH();
 +
-+                                                              if (zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) {
++                                                              if (zend_parse_ini_file(&fh2, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) {
 +                                                                      /* Here, add it to the list of ini files read */
 +                                                                      l = strlen(ini_file);
 +                                                                      total_l += l + 2;
This page took 0.041636 seconds and 4 git commands to generate.