]> granicus.if.org Git - php/commitdiff
More php3_ annihilation
authorZeev Suraski <zeev@php.net>
Fri, 17 Dec 1999 19:16:50 +0000 (19:16 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 17 Dec 1999 19:16:50 +0000 (19:16 +0000)
36 files changed:
config.guess
config.sub
ext/cpdf/cpdf.c
ext/db/db.c
ext/dbase/dbase.c
ext/filepro/filepro.c
ext/gd/gd.c
ext/hyperwave/hw.c
ext/mysql/php_mysql.c
ext/oci8/oci8.c
ext/posix/posix.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/fsock.c
ext/standard/fsock.h
ext/standard/image.c
ext/standard/iptc.c
ext/standard/link.c
ext/zlib/zlib.c
ltconfig
ltmain.sh
main.h
main/configuration-parser.y
main/fopen_wrappers.c
main/fopen_wrappers.h
main/internal_functions_registry.h
main/main.c
main/php.h
main/php_realpath.h
main/safe_mode.c
main/safe_mode.h
php3_realpath.c
sapi/cgi/cgi_main.c
sapi/servlet/servlet.c

index 6cb567b8ae6c0afe306ac67603e16d01e7309157..a9c6310504a12826daf0e093b76aaf330668b011 100644 (file)
@@ -618,12 +618,12 @@ EOF
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
     *:Linux:*:*)
-       # uname on the ARM produces all sorts of strangeness, and we need to
-       # filter it out.
-       case "$UNAME_MACHINE" in
-         armv*)                      UNAME_MACHINE=$UNAME_MACHINE ;;
-         arm* | sa110*)              UNAME_MACHINE="arm" ;;
-       esac
+#      # uname on the ARM produces all sorts of strangeness, and we need to
+#      # filter it out.
+#      case "$UNAME_MACHINE" in
+#        armv*)                      UNAME_MACHINE=$UNAME_MACHINE ;;
+#        arm* | sa110*)              UNAME_MACHINE="arm" ;;
+#      esac
 
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us. cd to the root directory to prevent
@@ -641,6 +641,7 @@ EOF
          sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
          armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
          m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         elf32arm)   echo "${UNAME_MACHINE}-unknown-linux-gnu"     ; exit 0 ;;
          elf32ppc)
                # Determine Lib Version
                cat >$dummy.c <<EOF
index 2436b45347a981164f777470398d5642517ea64e..7904593b5e0a5b7ba1857ad1c3fa07d97396f15b 100644 (file)
@@ -172,7 +172,7 @@ case $basic_machine in
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
                | mips64vr5000 | miprs64vr5000el \
-               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+               | armv[34][lb] | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
                | thumb | d10v)
                basic_machine=$basic_machine-unknown
                ;;
@@ -205,6 +205,7 @@ case $basic_machine in
              | mips64el-* | mips64orion-* | mips64orionel-* \
              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
              | mipstx39-* | mipstx39el-* \
+             | armv[34][lb]-* \
              | f301-* | armv*-* | t3e-* \
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
              | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
index cacb476ef5f79881ed1bcc88b4485e7627ac26d4..c19530d9fc0cc9460d15ea0da3af362cc4718f31 100644 (file)
@@ -2196,7 +2196,7 @@ PHP_FUNCTION(cpdf_output_buffer) {
 
        buffer = cpdf_getBufferForPDF(pdf, &lenght);
        php3_header();
-       php3_write(buffer, lenght);
+       php_write(buffer, lenght);
 
        RETURN_TRUE;
 }
index c26d3aef571154c5588335827868424cb4ffe4c5..7dff357e7732662a2cfa95f9eefff3e29133ff2c 100644 (file)
@@ -293,11 +293,11 @@ dbm_info *_php3_dbmopen(char *filename, char *mode) {
                return NULL;
        }
 
-       if (PG(safe_mode) && (!_php3_checkuid(filename, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(filename, 2))) {
                return NULL;
        }
 
-       if (_php3_check_open_basedir(filename)) {
+       if (php_check_open_basedir(filename)) {
                return NULL;
        }
 
index 475e20a3b87ced53c0f79b8e49ff45accb7d7cff..f8cb7b91c8738aab93acc89d4511cacc441f1594 100644 (file)
@@ -123,11 +123,11 @@ PHP_FUNCTION(dbase_open) {
        convert_to_string(dbf_name);
        convert_to_long(options);
 
-       if (PG(safe_mode) && (!_php3_checkuid(dbf_name->value.str.val, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(dbf_name->value.str.val, 2))) {
                RETURN_FALSE;
        }
        
-       if (_php3_check_open_basedir(dbf_name->value.str.val)) {
+       if (php_check_open_basedir(dbf_name->value.str.val)) {
                RETURN_FALSE;
        }
 
@@ -585,11 +585,11 @@ PHP_FUNCTION(dbase_create) {
                RETURN_FALSE;
        }
 
-       if (PG(safe_mode) && (!_php3_checkuid(filename->value.str.val, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(filename->value.str.val, 2))) {
                RETURN_FALSE;
        }
        
-       if (_php3_check_open_basedir(filename->value.str.val)) {
+       if (php_check_open_basedir(filename->value.str.val)) {
                RETURN_FALSE;
        }
 
index 44601f9e22943d7e4209fb11a6b39975cfdcb581..caa32669df7a52148270c422aa91d02891fd4073 100644 (file)
@@ -202,11 +202,11 @@ PHP_FUNCTION(filepro)
        
        sprintf(workbuf, "%s/map", dir->value.str.val);
 
-       if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
                RETURN_FALSE;
        }
        
-       if (_php3_check_open_basedir(workbuf)) {
+       if (php_check_open_basedir(workbuf)) {
                RETURN_FALSE;
        }
 
@@ -298,11 +298,11 @@ PHP_FUNCTION(filepro_rowcount)
        /* Now read the records in, moving forward recsize-1 bytes each time */
        sprintf(workbuf, "%s/key", FP_GLOBAL(fp_database));
 
-       if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
                RETURN_FALSE;
        }
        
-       if (_php3_check_open_basedir(workbuf)) {
+       if (php_check_open_basedir(workbuf)) {
                RETURN_FALSE;
        }
 
@@ -508,11 +508,11 @@ PHP_FUNCTION(filepro_retrieve)
        /* Now read the record in */
        sprintf(workbuf, "%s/key", FP_GLOBAL(fp_database));
 
-       if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+       if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
                RETURN_FALSE;
        }
        
-       if (_php3_check_open_basedir(workbuf)) {
+       if (php_check_open_basedir(workbuf)) {
                RETURN_FALSE;
        }
 
index 7296b3e919468d08674ef85fffb706508bba5aaf..8b989a8620d4de118388a6026ee83e5f6f9b6abf 100644 (file)
@@ -308,7 +308,7 @@ PHP_FUNCTION(imageloadfont) {
 #if WIN32|WINNT
        fp = fopen(file->value.str.val, "rb");
 #else
-       fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
 #endif
        if (fp == NULL) {
                php_error(E_WARNING, "ImageFontLoad: unable to open file");
@@ -412,10 +412,10 @@ void php3_imagecreatefrompng (INTERNAL_FUNCTION_PARAMETERS) {
 #if WIN32|WINNT
       fp = fopen(file->value.str.val, "rb");
 #else
-      fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+      fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
 #endif
       if (!fp) {
-              php3_strip_url_passwd(fn);
+              php_strip_url_passwd(fn);
               php3_error(E_WARNING,
                                       "ImageCreateFromPng: Unable to open %s for reading", fn);
               RETURN_FALSE;
@@ -447,7 +447,7 @@ void php3_imagepng (INTERNAL_FUNCTION_PARAMETERS) {
       if (argc == 2) {
               convert_to_string(file);
               fn = file->value.str.val;
-              if (!fn || fn == empty_string || _php3_check_open_basedir(fn)) {
+              if (!fn || fn == empty_string || php_check_open_basedir(fn)) {
                       php3_error(E_WARNING, "ImagePng: Invalid filename");
                       RETURN_FALSE;
               }
@@ -485,7 +485,7 @@ void php3_imagepng (INTERNAL_FUNCTION_PARAMETERS) {
             ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
 #endif
             while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
-                php3_write(buf, b);
+                php_write(buf, b);
             }
         }
         fclose(tmp);
@@ -522,10 +522,10 @@ PHP_FUNCTION(imagecreatefromgif )
 #if WIN32|WINNT
        fp = fopen(file->value.str.val, "rb");
 #else
-       fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
 #endif
        if (!fp) {
-               php3_strip_url_passwd(fn);
+               php_strip_url_passwd(fn);
                php_error(E_WARNING,
                                        "ImageCreateFromGif: Unable to open %s for reading", fn);
                RETURN_FALSE;
@@ -565,7 +565,7 @@ PHP_FUNCTION(imagegif )
        if (argc == 2) {
                convert_to_string(file);
                fn = file->value.str.val;
-               if (!fn || fn == empty_string || _php3_check_open_basedir(fn)) {
+               if (!fn || fn == empty_string || php_check_open_basedir(fn)) {
                        php_error(E_WARNING, "ImageGif: Invalid filename");
                        RETURN_FALSE;
                }
@@ -611,7 +611,7 @@ PHP_FUNCTION(imagegif )
                        }
 #endif
                        while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
-                               php3_write(buf, b);
+                               php_write(buf, b);
                        }
                }
 
index 627bdf7f2146fa20f9be1630b17966c951b9bb24..a8f7c747d211bf07da9ad69e7b08fe02e1fbb2e9 100644 (file)
@@ -2514,7 +2514,7 @@ PHP_FUNCTION(hw_output_document) {
        }
 
        if(php3_header())
-               php3_write(ptr->data, ptr->size);
+               php_write(ptr->data, ptr->size);
 
        RETURN_TRUE;
 }
index 7c65958403c85e3b9ecbd05f6a4d42e80899377b..279fe377226b5982a3046342ccb7d3de9dd29a51 100644 (file)
@@ -377,7 +377,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
                        php_error(E_NOTICE,"SQL safe mode in effect - ignoring host/user/password information");
                }
                host=passwd=NULL;
-               user=_php3_get_current_user();
+               user=php_get_current_user();
                hashed_details_length = strlen(user)+5+3;
                hashed_details = (char *) emalloc(hashed_details_length+1);
                sprintf(hashed_details,"mysql__%s_",user);
index a29124b00b3c3b9b2c90c6754e8d43132a51a3d8..b6f8e4cf89715c5b9bf622dee3cde272ac14d65c 100644 (file)
@@ -2532,7 +2532,7 @@ PHP_FUNCTION(ocisavelobfile)
 
                convert_to_string_ex(arg);
 
-               if (_php3_check_open_basedir((*arg)->value.str.val)) {
+               if (php_check_open_basedir((*arg)->value.str.val)) {
                        RETURN_FALSE;
                }
 
@@ -2675,7 +2675,7 @@ PHP_FUNCTION(ociwritelobtofile)
                }
 
                if (filename && *filename) {
-                       if (_php3_check_open_basedir(filename)) {
+                       if (php_check_open_basedir(filename)) {
                                goto bail;
                        }
 
index 8a26d0957ad2422a28fd2b69301cead8b0792de0..248c08e62f8090efc329e9ad3918e4a05a601d9a 100644 (file)
@@ -604,7 +604,7 @@ PHP_FUNCTION(posix_mkfifo)
        convert_to_string(path);
        convert_to_long(mode);
 
-       if (php3_ini.safe_mode && (!_php3_checkuid(path->value.str.val, 3))) {
+       if (php3_ini.safe_mode && (!php_checkuid(path->value.str.val, 3))) {
                RETURN_FALSE;
        }
        result = mkfifo(path->value.str.val, mode->value.lval);
index 8538ab0c66eb48ddc6cfbec0809fe2cbc587a162..77264d49117f93bbf179901c460abb084fea76ad 100644 (file)
@@ -167,8 +167,8 @@ function_entry basic_functions[] = {
        PHP_FE(parse_str,                                                               NULL)
        PHP_FALIAS(rtrim,                       chop,                           NULL)
        PHP_FALIAS(strchr,                      strstr,                         NULL)
-       PHP_NAMED_FE(sprintf,           php3_user_sprintf,      NULL)
-       PHP_NAMED_FE(printf,            php3_user_printf,       NULL)
+       PHP_NAMED_FE(sprintf,           PHP_FN(user_sprintf),   NULL)
+       PHP_NAMED_FE(printf,            PHP_FN(user_printf),    NULL)
        
        PHP_FE(parse_url,                                                               NULL)
        PHP_FE(urlencode,                                                               NULL)
@@ -291,7 +291,7 @@ function_entry basic_functions[] = {
        PHP_FE(register_shutdown_function,      NULL)
 
        PHP_FE(highlight_file,                          NULL)   
-       PHP_NAMED_FE(show_source, php3_highlight_file, NULL)
+       PHP_NAMED_FE(show_source, PHP_FN(highlight_file), NULL)
        PHP_FE(highlight_string,                        NULL)
        
        PHP_FE(ini_get,                                         NULL)
@@ -760,7 +760,7 @@ PHP_FUNCTION(settype)
 
 PHP_FUNCTION(get_current_user)
 {
-       RETURN_STRING(_php3_get_current_user(),1);
+       RETURN_STRING(php_get_current_user(),1);
 }
 
 
@@ -959,7 +959,7 @@ PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers){
                return FAILURE;
                break;
        case 3: /*save to a file*/
-               logfile=php3_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
+               logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
                if(!logfile) {
                        php_error(E_WARNING,"error_log: Unable to write to %s",opt);
                        return FAILURE;
@@ -968,7 +968,7 @@ PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers){
                fclose(logfile);
                break;
        default:
-               php3_log_err(message);
+               php_log_err(message);
                break;
        }
        return SUCCESS;
index 4f40dd2d986d3929f82c18c1cbcf6a2b32d796be..0717badf873973b47160fb19f7249c6a7dc98e08 100644 (file)
@@ -151,7 +151,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
        }
        convert_to_string_ex(arg);
 
-       if (_php3_check_open_basedir((*arg)->value.str.val)) {
+       if (php_check_open_basedir((*arg)->value.str.val)) {
                RETURN_FALSE;
        }
        
index 60e0b30d9a0da878f23b92a07fb0c876bf58b5b8..d4cd4fae3d19b0381c493f126881a00df180512e 100644 (file)
@@ -412,11 +412,11 @@ PHP_FUNCTION(get_meta_tags)
        }
        convert_to_string_ex(filename);
        
-       fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
        if (!fp && !socketd) {
                if (issock != BAD_URL) {
                        char *tmp = estrdup((*filename)->value.str.val);
-                       php3_strip_url_passwd(tmp);
+                       php_strip_url_passwd(tmp);
                        php_error(E_WARNING,"get_meta_tags(\"%s\") - %s", tmp, strerror(errno));
                        efree(tmp);
                }
@@ -542,11 +542,11 @@ PHP_FUNCTION(file)
        }
        convert_to_string_ex(filename);
        
-       fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
        if (!fp && !socketd) {
                if (issock != BAD_URL) {
                        char *tmp = estrdup((*filename)->value.str.val);
-                       php3_strip_url_passwd(tmp);
+                       php_strip_url_passwd(tmp);
                        php_error(E_WARNING,"file(\"%s\") - %s", tmp, strerror(errno));
                        efree(tmp);
                }
@@ -659,11 +659,11 @@ PHP_FUNCTION(fopen)
         * We need a better way of returning error messages from
         * php3_fopen__wrapper().
         */
-       fp = php3_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
        if (!fp && !socketd) {
                if (issock != BAD_URL) {
                        char *tmp = estrdup((*arg1)->value.str.val);
-                       php3_strip_url_passwd(tmp);
+                       php_strip_url_passwd(tmp);
                        php_error(E_WARNING,"fopen(\"%s\",\"%s\") - %s", tmp, p, strerror(errno));
                        efree(tmp);
                }
@@ -1210,7 +1210,7 @@ PHP_FUNCTION(mkdir)
        convert_to_string_ex(arg1);
        convert_to_long_ex(arg2);
        mode = (*arg2)->value.lval;
-       if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,3))) {
+       if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,3))) {
                RETURN_FALSE;
        }
        ret = mkdir((*arg1)->value.str.val,mode);
@@ -1235,7 +1235,7 @@ PHP_FUNCTION(rmdir)
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(arg1);
-       if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,1))) {
+       if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,1))) {
                RETURN_FALSE;
        }
        ret = rmdir((*arg1)->value.str.val);
@@ -1325,13 +1325,13 @@ PHP_FUNCTION(readfile)
 
        /*
         * We need a better way of returning error messages from
-        * php3_fopen_wrapper().
+        * php_fopen_wrapper().
         */
-       fp = php3_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+       fp = php_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
        if (!fp && !socketd){
                if (issock != BAD_URL) {
                        char *tmp = estrdup((*arg1)->value.str.val);
-                       php3_strip_url_passwd(tmp);
+                       php_strip_url_passwd(tmp);
                        php_error(E_WARNING,"readfile(\"%s\") - %s", tmp, strerror(errno));
                        efree(tmp);
                }
@@ -1429,7 +1429,7 @@ PHP_FUNCTION(rename)
        old_name = (*old_arg)->value.str.val;
        new_name = (*new_arg)->value.str.val;
 
-       if (PG(safe_mode) &&(!_php3_checkuid(old_name, 2))) {
+       if (PG(safe_mode) &&(!php_checkuid(old_name, 2))) {
                RETURN_FALSE;
        }
        ret = rename(old_name, new_name);
@@ -1460,7 +1460,7 @@ PHP_FUNCTION(copy)
        convert_to_string_ex(source);
        convert_to_string_ex(target);
 
-       if (PG(safe_mode) &&(!_php3_checkuid((*source)->value.str.val,2))) {
+       if (PG(safe_mode) &&(!php_checkuid((*source)->value.str.val,2))) {
                RETURN_FALSE;
        }
        
index 39303afe6a5e6939edc83aab578c0c2f39738934..4a33ea7ff5f40da4b6774bdc05df24333afbee2d 100644 (file)
@@ -142,7 +142,7 @@ PHP_FUNCTION(diskfreespace)
 
        convert_to_string(path);
 
-       if (_php3_check_open_basedir(path->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir(path->value.str.val)) RETURN_FALSE;
 
 #ifdef WINDOWS
        /* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2,
@@ -228,12 +228,12 @@ PHP_FUNCTION(chgrp)
                gid = group->value.lval;
        }
 
-       if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+       if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
                RETURN_FALSE;
        }
 
        /* Check the basedir */
-       if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
 
        ret = chown(filename->value.str.val, -1, gid);
        if (ret == -1) {
@@ -273,12 +273,12 @@ PHP_FUNCTION(chown)
                uid = user->value.lval;
        }
 
-       if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+       if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
                RETURN_FALSE;
        }
 
        /* Check the basedir */
-       if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
 
        ret = chown(filename->value.str.val, uid, -1);
        if (ret == -1) {
@@ -302,12 +302,12 @@ PHP_FUNCTION(chmod)
        convert_to_string(filename);
        convert_to_long(mode);
 
-       if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+       if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
                RETURN_FALSE;
        }
 
        /* Check the basedir */
-       if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
 
        ret = chmod(filename->value.str.val, mode->value.lval);
        if (ret == -1) {
@@ -353,13 +353,13 @@ PHP_FUNCTION(touch)
        }
        convert_to_string(filename);
 
-       if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+       if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
                if (newtime) efree(newtime);
                RETURN_FALSE;
        }
 
        /* Check the basedir */
-       if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
 
        /* create the file if it doesn't exist already */
        ret = stat(filename->value.str.val, &sb);
index 7366859f396e4095712a62d7f0253e28ab9108cc..bbb22c9f1fcfa984249e9a31c28104b2d2de3aba 100644 (file)
@@ -484,7 +484,7 @@ int _php3_sock_destroy(int socket)
 
 #define SOCK_CLOSE(s) shutdown(s, 0); closesocket(s)
 
-int _php3_sock_close(int socket)
+int php_sock_close(int socket)
 {
        int ret = 0;
        php3i_sockbuf *sock;
@@ -593,11 +593,11 @@ int _php3_sock_set_blocking(int socket, int mode)
        SOCK_FIND(sock, socket); \
        if(sock->is_blocked) _php3_sock_read_total(sock, max); else _php3_sock_read(sock)
 
-/* {{{ _php3_sock_fgets() */
+/* {{{ php_sock_fgets() */
 /*
  * FIXME: fgets depends on '\n' as line delimiter
  */
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket)
+char *php_sock_fgets(char *buf, size_t maxlen, int socket)
 {
        char *p = NULL;
        char *ret = NULL;
@@ -655,7 +655,7 @@ char *_php3_sock_fgets(char *buf, size_t maxlen, int socket)
  * ss@2ns.de 19990528
  */
 
-int _php3_sock_fgetc(int socket)
+int php_sock_fgetc(int socket)
 {
        int ret = EOF;
        SOCK_FIND_AND_READ_MAX(1);
@@ -668,7 +668,7 @@ int _php3_sock_fgetc(int socket)
        return ret;
 }
 
-int _php3_sock_feof(int socket)
+int php_sock_feof(int socket)
 {
        int ret = 0;
        SOCK_FIND(sock, socket);
@@ -682,9 +682,9 @@ int _php3_sock_feof(int socket)
        return ret;
 }
 
-/* {{{ _php3_sock_fread() */
+/* {{{ php_sock_fread() */
 
-size_t _php3_sock_fread(char *ptr, size_t size, int socket)
+size_t php_sock_fread(char *ptr, size_t size, int socket)
 {
        size_t ret = 0;
        SOCK_FIND_AND_READ_MAX(size);
index cc0a360e25a3201ba934471f224d69bcaa580457..a833f9be44dbe0b4fedc611d9bf38b4546a89777 100644 (file)
@@ -61,14 +61,14 @@ extern php3_module_entry fsock_module_entry;
 PHP_FUNCTION(fsockopen);
 PHP_FUNCTION(pfsockopen);
 int lookup_hostname(const char *addr, struct in_addr *in);
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket);
-size_t _php3_sock_fread(char *buf, size_t maxlen, int socket);
-int _php3_sock_feof(int socket);
-int _php3_sock_fgetc(int socket);
+char *php_sock_fgets(char *buf, size_t maxlen, int socket);
+size_t php_sock_fread(char *buf, size_t maxlen, int socket);
+int php_sock_feof(int socket);
+int php_sock_fgetc(int socket);
 int _php3_is_persistent_sock(int);
 int _php3_sock_set_blocking(int socket, int mode);
 int _php3_sock_destroy(int socket);
-int _php3_sock_close(int socket);
+int php_sock_close(int socket);
 size_t _php3_sock_set_def_chunk_size(size_t size);
 int php_msock_destroy(int *data);
 
index 5c1578faf6cd95c3950b5c5afd67c186e5599bb0..06dcd0228b806d1f1e86554ea8303dbf32f15ab1 100644 (file)
@@ -336,7 +336,7 @@ PHP_FUNCTION(getimagesize)
        }
                
        /* Check open_basedir */
-       if (_php3_check_open_basedir((*arg1)->value.str.val)) return;
+       if (php_check_open_basedir((*arg1)->value.str.val)) return;
        
        if ((fp = fopen((*arg1)->value.str.val,"rb")) == 0) {
                php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
index 540ae518d1853a66154c216e8bb84d3080167ac8..f790b35446d4dca1d4125d39d01fdb686dcfeed9 100644 (file)
@@ -195,7 +195,7 @@ PHP_FUNCTION(iptcembed)
         break;
     }
 
-    if (_php3_check_open_basedir((*jpeg_file)->value.str.val)) 
+    if (php_check_open_basedir((*jpeg_file)->value.str.val)) 
                RETURN_FALSE;
 
     if ((fp = fopen((*jpeg_file)->value.str.val,"rb")) == 0) {
index f296a2dbcb9268ab58ed652b08d2a2c26080b658..1acbcdc4c4fe8d97c5f7b15b548615b6d5d0a0d1 100644 (file)
@@ -113,7 +113,7 @@ PHP_FUNCTION(symlink)
        convert_to_string_ex(topath);
        convert_to_string_ex(frompath);
 
-       if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+       if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
                RETURN_FALSE;
        }
        if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
@@ -146,7 +146,7 @@ PHP_FUNCTION(link)
        convert_to_string_ex(topath);
        convert_to_string_ex(frompath);
 
-       if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+       if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
                RETURN_FALSE;
        }
        if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
@@ -177,7 +177,7 @@ PHP_FUNCTION(unlink)
        }
        convert_to_string_ex(filename);
 
-       if (PG(safe_mode) && !_php3_checkuid((*filename)->value.str.val, 2)) {
+       if (PG(safe_mode) && !php_checkuid((*filename)->value.str.val, 2)) {
                RETURN_FALSE;
        }
 
@@ -187,7 +187,7 @@ PHP_FUNCTION(unlink)
                RETURN_FALSE;
        }
        /* Clear stat cache */
-       php3_clearstatcache(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+       PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        RETURN_TRUE;
 }
 /* }}} */
index 6043d32279d1cec27077bc40d9035f9e5822a7a2..a42a1bcc95b5c2112266a365f44024c4d5bb864e 100644 (file)
@@ -65,7 +65,7 @@
 #define PUTC(a) PUTS(a)
 #endif
 #ifndef PHPWRITE
-#define PHPWRITE(a,n) php3_write((a),(n))
+#define PHPWRITE(a,n) php_write((a),(n))
 #endif
 #endif
 
@@ -159,10 +159,10 @@ static gzFile php3_gzopen_wrapper(char *path, char *mode, int options)
                return php3_gzopen_with_path(path, mode, PG(include_path), NULL);
        }
        else {
-               if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path,1))) {
+               if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path,1))) {
                        return NULL;
                }
-               if (_php3_check_open_basedir(path)) return NULL;
+               if (php_check_open_basedir(path)) return NULL;
                return gzopen(path, mode);
        }
 }
@@ -185,10 +185,10 @@ static gzFile *php3_gzopen_with_path(char *filename, char *mode, char *path, cha
        
        /* Relative path open */
        if (*filename == '.') {
-               if (PG(safe_mode) &&(!_php3_checkuid(filename,2))) {
+               if (PG(safe_mode) &&(!php_checkuid(filename,2))) {
                        return(NULL);
                }
-               if (_php3_check_open_basedir(filename)) return NULL;
+               if (php_check_open_basedir(filename)) return NULL;
                zp = gzopen(filename, mode);
                if (zp && opened_path) {
                        *opened_path = expand_filepath(filename);
@@ -208,26 +208,26 @@ static gzFile *php3_gzopen_with_path(char *filename, char *mode, char *path, cha
                        } else {
                                strlcpy(trypath,filename,sizeof(trypath));
                        }
-                       if (!_php3_checkuid(trypath,2)) {
+                       if (!php_checkuid(trypath,2)) {
                                return(NULL);
                        }
-                       if (_php3_check_open_basedir(trypath)) return NULL;
+                       if (php_check_open_basedir(trypath)) return NULL;
                        zp = gzopen(trypath, mode);
                        if (zp && opened_path) {
                                *opened_path = expand_filepath(trypath);
                        }
                        return zp;
                } else {
-                       if (_php3_check_open_basedir(filename)) return NULL;
+                       if (php_check_open_basedir(filename)) return NULL;
                        return gzopen(filename, mode);
                }
        }
 
        if (!path || (path && !*path)) {
-               if (PG(safe_mode) &&(!_php3_checkuid(filename,2))) {
+               if (PG(safe_mode) &&(!php_checkuid(filename,2))) {
                        return(NULL);
                }
-               if (_php3_check_open_basedir(filename)) return NULL;
+               if (php_check_open_basedir(filename)) return NULL;
                zp = gzopen(filename, mode);
                if (zp && opened_path) {
                        *opened_path = strdup(filename);
@@ -251,13 +251,13 @@ static gzFile *php3_gzopen_with_path(char *filename, char *mode, char *path, cha
                }
                snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename);
                if (PG(safe_mode)) {
-                       if (stat(trypath,&sb) == 0 &&(!_php3_checkuid(trypath,2))) {
+                       if (stat(trypath,&sb) == 0 &&(!php_checkuid(trypath,2))) {
                                efree(pathbuf);
                                return(NULL);
                        }
                }
                if ((zp = gzopen(trypath, mode)) != NULL) {
-                       if (_php3_check_open_basedir(trypath)) {
+                       if (php_check_open_basedir(trypath)) {
                                gzclose(zp);
                                efree(pathbuf);
                                return NULL;
index 7468691343713cd6d3f45432144ff4b469102262..65ec6f65d0f6f19d0654b0caa89169d685aae684 100644 (file)
--- a/ltconfig
+++ b/ltconfig
@@ -1188,8 +1188,8 @@ EOF
 
   netbsd*)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
       # can we support soname and/or expsyms with a.out? -oliva
@@ -1210,8 +1210,8 @@ EOF
 
 EOF
     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       ld_shlibs=no
     fi
@@ -1226,8 +1226,8 @@ EOF
 
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       ld_shlibs=no
     fi
@@ -1428,9 +1428,9 @@ else
     no_undefined_flag=' -z text'
     # $CC -shared without GNU ld will not create a library from C++
     # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD $compile_rpath -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $LD $compile_rpath -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
     hardcode_libdir_flag_spec='-R$libdir'
     hardcode_shlibpath_var=no
     case "$host_os" in
index fa67f41b5062b125ff007b9f08bca0ab9a27dd5a..ae10cad021b7989973632c44046c9bd9a91e392f 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1162,7 +1162,7 @@ compiler."
 
       *.o | *.obj | *.a | *.lib)
        # A standard object.
-       libobjs="$libobjs $arg"
+       objs="$objs $arg"
        ;;
 
       *.lo)
@@ -1796,94 +1796,6 @@ compiler."
        esac
       fi
 
-      if test -n "$rpath$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       for libdir in $rpath $xrpath; do
-         # This is the magic to use -rpath.
-         case "$compile_rpath " in
-         *" $libdir "*) ;;
-         *) compile_rpath="$compile_rpath $libdir" ;;
-         esac
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$perm_rpath " in
-         *" $libdir "*) ;;
-         *) perm_rpath="$perm_rpath $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$finalize_perm_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
       # Create the output directory, or remove our outputs if we need to.
       if test -d $output_objdir; then
        $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
@@ -2043,7 +1955,6 @@ EOF
                    done
              done
              if test -n "$a_deplib" ; then
-               newdeplibs="$newdeplibs $a_deplib"
                droppeddeps=yes
                echo
                echo "*** Warning: This library needs some functionality provided by $a_deplib."
diff --git a/main.h b/main.h
index e476f490dde981c741f182f1d9312c84cf9b1b3b..199132a8bb021ba7a8cd5f04c68b6104a898cf45 100644 (file)
--- a/main.h
+++ b/main.h
@@ -46,11 +46,11 @@ extern void php_call_shutdown_functions(void);
 
 
 /* configuration module */
-extern int php3_init_config(void);
-extern int php3_shutdown_config(void);
+extern int php_init_config(void);
+extern int php_shutdown_config(void);
 
 /* environment module */
-extern int php3_init_environ(void);
-extern int php3_shutdown_environ(void);
+extern int php_init_environ(void);
+extern int php_shutdown_environ(void);
 
 #endif
index 079edd4bb4ba23d075f30d96cc0cc5d30b0a18bf..a7661d754723b6439b482ed70376360783f04da7 100644 (file)
@@ -145,7 +145,7 @@ static int pvalue_browscap_destructor(pval *pvalue)
 }
 
 
-int php3_init_config(void)
+int php_init_config(void)
 {
        PLS_FETCH();
 
@@ -201,7 +201,7 @@ int php3_init_config(void)
                }
                PG(safe_mode) = 0;
                PG(open_basedir) = NULL;
-               cfgin = php3_fopen_with_path("php.ini","r",php_ini_path,&opened_path);
+               cfgin = php_fopen_with_path("php.ini","r",php_ini_path,&opened_path);
                free(php_ini_path);
                if (free_default_location) {
                        free(default_location);
@@ -269,7 +269,7 @@ PHP_MINIT_FUNCTION(browscap)
 }
 
 
-int php3_shutdown_config(void)
+int php_shutdown_config(void)
 {
        zend_hash_destroy(&configuration_hash);
        return SUCCESS;
index c3f32dd15ba3a28613d6ca98ec9931acfe14a190..c3601556a8ba728590c012c643b573f0a07247d2 100644 (file)
@@ -89,7 +89,7 @@ int _php3_getftpresult(int socketd);
        
        When open_basedir is NULL, always return 0
 */
-PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC)
+PHPAPI int php_check_specific_open_basedir(char *basedir, char *path PLS_DC)
 {
        char resolved_name[MAXPATHLEN];
        char resolved_basedir[MAXPATHLEN];
@@ -122,7 +122,7 @@ PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC)
        }
 
        /* Resolve the real path into resolved_name */
-       if ((_php3_realpath(path, resolved_name) != NULL) && (_php3_realpath(local_open_basedir, resolved_basedir) != NULL)) {
+       if ((php_realpath(path, resolved_name) != NULL) && (php_realpath(local_open_basedir, resolved_basedir) != NULL)) {
                /* Check the path */
 #if WIN32|WINNT
                if (strncasecmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) {
@@ -140,7 +140,7 @@ PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC)
        }
 }
 
-PHPAPI int _php3_check_open_basedir(char *path)
+PHPAPI int php_check_open_basedir(char *path)
 {
        PLS_FETCH();
 
@@ -165,7 +165,7 @@ PHPAPI int _php3_check_open_basedir(char *path)
                                end++;
                        }
 
-                       if (_php3_check_specific_open_basedir(ptr, path PLS_CC) == 0) {
+                       if (php_check_specific_open_basedir(ptr, path PLS_CC) == 0) {
                                efree(pathbuf);
                                return 0;
                        }
@@ -181,7 +181,7 @@ PHPAPI int _php3_check_open_basedir(char *path)
        return 0;
 }
 
-PHPAPI FILE *php3_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
+PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
 {
        int cm=2;  /* checkuid mode: 2 = if file does not exist, check directory */
        PLS_FETCH();
@@ -199,20 +199,20 @@ PHPAPI FILE *php3_fopen_wrapper(char *path, char *mode, int options, int *issock
 #endif
 
        if (options & USE_PATH && PG(include_path) != NULL) {
-               return php3_fopen_with_path(path, mode, PG(include_path), opened_path);
+               return php_fopen_with_path(path, mode, PG(include_path), opened_path);
        } else {
                if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
-               if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path, cm))) {
+               if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path, cm))) {
                        return NULL;
                }
-               if (_php3_check_open_basedir(path)) return NULL;
+               if (php_check_open_basedir(path)) return NULL;
                return fopen(path, mode);
        }
 }
 
 #if CGI_BINARY || FHTTPD || USE_SAPI
 
-PHPAPI FILE *php3_fopen_for_parser(void)
+PHPAPI FILE *php_fopen_primary_script(void)
 {
        FILE *fp;
        struct stat st;
@@ -315,7 +315,7 @@ PHPAPI FILE *php3_fopen_for_parser(void)
  * Tries to open a file with a PATH-style list of directories.
  * If the filename starts with "." or "/", the path is ignored.
  */
-PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char **opened_path)
+PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path)
 {
        char *pathbuf, *ptr, *end;
        char trypath[MAXPATHLEN + 1];
@@ -331,10 +331,10 @@ PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char *
        if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
        /* Relative path open */
        if (*filename == '.') {
-               if (PG(safe_mode) && (!_php3_checkuid(filename, cm))) {
+               if (PG(safe_mode) && (!php_checkuid(filename, cm))) {
                        return NULL;
                }
-               if (_php3_check_open_basedir(filename)) return NULL;
+               if (php_check_open_basedir(filename)) return NULL;
                fp = fopen(filename, mode);
                if (fp && opened_path) {
                        *opened_path = expand_filepath(filename);
@@ -353,25 +353,25 @@ PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char *
                        } else {
                                strlcpy(trypath,filename,sizeof(trypath));
                        }
-                       if (!_php3_checkuid(trypath, cm)) {
+                       if (!php_checkuid(trypath, cm)) {
                                return NULL;
                        }
-                       if (_php3_check_open_basedir(trypath)) return NULL;
+                       if (php_check_open_basedir(trypath)) return NULL;
                        fp = fopen(trypath, mode);
                        if (fp && opened_path) {
                                *opened_path = expand_filepath(trypath);
                        }
                        return fp;
                } else {
-                       if (_php3_check_open_basedir(filename)) return NULL;
+                       if (php_check_open_basedir(filename)) return NULL;
                        return fopen(filename, mode);
                }
        }
        if (!path || (path && !*path)) {
-               if (PG(safe_mode) && (!_php3_checkuid(filename, cm))) {
+               if (PG(safe_mode) && (!php_checkuid(filename, cm))) {
                        return NULL;
                }
-               if (_php3_check_open_basedir(filename)) return NULL;
+               if (php_check_open_basedir(filename)) return NULL;
                fp = fopen(filename, mode);
                if (fp && opened_path) {
                        *opened_path = strdup(filename);
@@ -394,13 +394,13 @@ PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char *
                }
                snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename);
                if (PG(safe_mode)) {
-                       if (stat(trypath, &sb) == 0 && (!_php3_checkuid(trypath, cm))) {
+                       if (stat(trypath, &sb) == 0 && (!php_checkuid(trypath, cm))) {
                                efree(pathbuf);
                                return NULL;
                        }
                }
                if ((fp = fopen(trypath, mode)) != NULL) {
-                       if (_php3_check_open_basedir(trypath)) {
+                       if (php_check_open_basedir(trypath)) {
                                fclose(fp);
                                efree(pathbuf);
                                return NULL;
@@ -892,14 +892,14 @@ static FILE *php3_fopen_url_wrapper(const char *path, char *mode, int options, i
                PLS_FETCH();
 
                if (options & USE_PATH) {
-                       fp = php3_fopen_with_path((char *) path, mode, PG(include_path), opened_path);
+                       fp = php_fopen_with_path((char *) path, mode, PG(include_path), opened_path);
                } else {
                        int cm=2;
                        if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
-                       if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path, cm))) {
+                       if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path, cm))) {
                                fp = NULL;
                        } else {
-                               if (_php3_check_open_basedir((char *) path)) {
+                               if (php_check_open_basedir((char *) path)) {
                                        fp = NULL;
                                } else {
                                        fp = fopen(path, mode);
@@ -929,13 +929,13 @@ int _php3_getftpresult(int socketd)
        return strtol(tmp_line, NULL, 10);
 }
 
-PHPAPI int php3_isurl(char *path)
+PHPAPI int php_is_url(char *path)
 {
        return (!strncasecmp(path, "http://", 7) || !strncasecmp(path, "ftp://", 6));
 }
 
 
-PHPAPI char *php3_strip_url_passwd(char *url)
+PHPAPI char *php_strip_url_passwd(char *url)
 {
        register char *p = url, *url_start;
        
index e92bd83a88fad9007f2545a1b66c4da5e2d031f5..5ec3e385cbf0f116fe179316c59e48908d1e5b38 100644 (file)
 #endif
 #define SOCK_WRITE(d,s) send(s,d,strlen(d),0)
 #define SOCK_WRITEL(d,l,s) send(s,d,l,0)
-#define SOCK_FGETC(s) _php3_sock_fgetc((s))
-#define SOCK_FGETS(b,l,s) _php3_sock_fgets((b),(l),(s))
-#define SOCK_FEOF(sock) _php3_sock_feof((sock))
-#define SOCK_FREAD(ptr,size,sock) _php3_sock_fread((ptr),(size),(sock))
-#define SOCK_FCLOSE(s) _php3_sock_close(s)
+#define SOCK_FGETC(s) php_sock_fgetc((s))
+#define SOCK_FGETS(b,l,s) php_sock_fgets((b),(l),(s))
+#define SOCK_FEOF(sock) php_sock_feof((sock))
+#define SOCK_FREAD(ptr,size,sock) php_sock_fread((ptr),(size),(sock))
+#define SOCK_FCLOSE(s) php_sock_close(s)
 
 #define FP_FGETS(buf,len,sock,fp,issock) \
        ((issock)?SOCK_FGETS(buf,len,sock):fgets(buf,len,fp))
 #define IS_SOCKET              1
 #define BAD_URL                        2
 
-extern PHPAPI FILE *php3_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd, char **opened_path);
+extern PHPAPI FILE *php_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd, char **opened_path);
 
-PHPAPI FILE *php3_fopen_for_parser(void);
+PHPAPI FILE *php_fopen_primary_script(void);
 
-extern PHPAPI int _php3_check_open_basedir(char *path);
-extern PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC);
+extern PHPAPI int php_check_open_basedir(char *path);
+extern PHPAPI int php_check_specific_open_basedir(char *basedir, char *path PLS_DC);
 
-extern PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
+extern PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
 
-extern PHPAPI int php3_isurl(char *path);
-extern PHPAPI char *php3_strip_url_passwd(char *path);
+extern PHPAPI int php_is_url(char *path);
+extern PHPAPI char *php_strip_url_passwd(char *path);
 
 extern PHPAPI char *expand_filepath(char *filepath);
 
index b7d2a161290680205ed13d2ca476956943002b21..8329a95914d9c20d312e19e663c6a29c959a0b8e 100644 (file)
 #ifndef _INTERNAL_FUNCTIONS_REGISTRY_H
 #define _INTERNAL_FUNCTIONS_REGISTRY_H
 
-extern int php3_init_mime(INIT_FUNC_ARGS);
+extern int php_init_mime(INIT_FUNC_ARGS);
 
 #if APACHE
-extern php3_module_entry apache_module_entry;
+extern zend_module_entry apache_module_entry;
 #define phpext_apache_ptr &apache_module_entry
-extern void php3_virtual(INTERNAL_FUNCTION_PARAMETERS);
+extern void php_virtual(INTERNAL_FUNCTION_PARAMETERS);
 #else
 #define phpext_apache_ptr NULL
 #endif
 
 /* environment functions */
-extern int php3_init_environment(void);
+extern int php_init_environment(void);
 
 #endif
 
index 8b565733a1db36485e7aa4474d53f78a622c7a5a..2fc014eeac65b5686b3cac7939724715159c716e 100644 (file)
@@ -289,7 +289,7 @@ void php3_apache_putc(char c)
 #endif
 #endif
 
-void php3_log_err(char *log_message)
+void php_log_err(char *log_message)
 {
        FILE *log_file;
        char error_time_str[128];
@@ -349,7 +349,7 @@ void php3_log_err(char *log_message)
 #define PRINTF_BUFFER_SIZE 1024*4
 
 /* wrapper for modules to use PHPWRITE */
-PHPAPI int php3_write(void *buf, int size)
+PHPAPI int php_write(void *buf, int size)
 {
        return PHPWRITE(buf, size);
 }
@@ -452,7 +452,7 @@ PHPAPI void php_error(int type, const char *format,...)
                                char log_buffer[1024];
 
                                snprintf(log_buffer, 1024, "PHP %s:  %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);
-                               php3_log_err(log_buffer);
+                               php_log_err(log_buffer);
                        }
                        if (PG(display_errors)) {
                                char *prepend_string = INI_STR("error_prepend_string");
@@ -584,7 +584,7 @@ static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path
        FILE *retval;
        
        old_chunk_size = _php3_sock_set_def_chunk_size(1);
-       retval=php3_fopen_wrapper((char *) filename, "r", USE_PATH|IGNORE_URL_WIN, &issock, &socketd, opened_path);
+       retval=php_fopen_wrapper((char *) filename, "r", USE_PATH|IGNORE_URL_WIN, &issock, &socketd, opened_path);
        _php3_sock_set_def_chunk_size(old_chunk_size);
        
        if (issock) {
@@ -619,17 +619,17 @@ static void php_message_handler_for_zend(long message, void *data)
                case ZMSG_FAILED_INCLUDE_FOPEN: {
                                PLS_FETCH();
 
-                               php_error(E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php3_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
+                               php_error(E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
                        }
                        break;
                case ZMSG_FAILED_REQUIRE_FOPEN: {
                                PLS_FETCH();
 
-                               php_error(E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php3_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
+                               php_error(E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
                        }
                        break;
                case ZMSG_FAILED_HIGHLIGHT_FOPEN:
-                       php_error(E_WARNING, "Failed opening '%s' for highlighting", php3_strip_url_passwd((char *) data));
+                       php_error(E_WARNING, "Failed opening '%s' for highlighting", php_strip_url_passwd((char *) data));
                        break;
                case ZMSG_MEMORY_LEAK_DETECTED:
                case ZMSG_MEMORY_LEAK_REPEATED: {
@@ -829,7 +829,7 @@ void php_request_shutdown(void *dummy)
 
 static int php3_config_ini_startup(void)
 {
-       if (php3_init_config() == FAILURE) {
+       if (php_init_config() == FAILURE) {
                php_printf("PHP:  Unable to parse configuration file.\n");
                return FAILURE;
        }
@@ -838,7 +838,7 @@ static int php3_config_ini_startup(void)
 
 static void php3_config_ini_shutdown(void)
 {
-       php3_shutdown_config();
+       php_shutdown_config();
 }
 
 
index 6caa8c445cbb3351c548149f1a5677a86c3b8030..7201592f7f3367b980ac4eb0d12dbc5b3b758a70 100644 (file)
@@ -263,21 +263,21 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list);
 #define MAXPATHLEN 256    /* Should be safe for any weird systems that do not define it */
 #endif
 
-#define PHP_FN(name) php3_##name
+#define PHP_FN(name) php_if_##name
 #define PHP_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
-#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name)
+#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(PHP_FN(name))
 
 #define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types },
-#define PHP_FE(name, arg_types) PHP_NAMED_FE(name, php3_##name, arg_types)
-#define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, php3_##alias, arg_types)
+#define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types)
+#define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types)
 
-#define PHP_MINIT(module)      php3_minit_##module
-#define PHP_MSHUTDOWN(module)  php3_mshutdown_##module
-#define PHP_RINIT(module)      php3_rinit_##module
-#define PHP_RSHUTDOWN(module)  php3_rshutdown_##module
-#define PHP_MINFO(module)      php3_info_##module
-#define PHP_GINIT(module)              php3_ginit_##module
-#define PHP_GSHUTDOWN(module)  php3_gshutdown_##module
+#define PHP_MINIT(module)      php_minit_##module
+#define PHP_MSHUTDOWN(module)  php_mshutdown_##module
+#define PHP_RINIT(module)      php_rinit_##module
+#define PHP_RSHUTDOWN(module)  php_rshutdown_##module
+#define PHP_MINFO(module)      php_info_##module
+#define PHP_GINIT(module)      php_ginit_##module
+#define PHP_GSHUTDOWN(module)  php_gshutdown_##module
 
 #define PHP_MINIT_FUNCTION(module)     int PHP_MINIT(module)(INIT_FUNC_ARGS)
 #define PHP_MSHUTDOWN_FUNCTION(module) int PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
@@ -296,9 +296,9 @@ extern char **environ;
 
 extern void phperror(char *error);
 extern PHPAPI void php_error(int type, const char *format,...);
-extern PHPAPI int php3_write(void *buf, int size);
+extern PHPAPI int php_write(void *buf, int size);
 extern PHPAPI int php_printf(const char *format,...);
-extern void php3_log_err(char *log_message);
+extern void php_log_err(char *log_message);
 extern int Debug(char *format,...);
 extern int cfgparse(void);
 
index 92ecdf8574344ceda39ad56b75900176b30615db..9510c43695a0fe82b9ef7a20a746ae59e54a4d6b 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef _PHP_REALPATH_H_
 #define _PHP_REALPATH_H_
 
-extern char *_php3_realpath(const char *path, char resolved_path []);
+extern char *php_realpath(const char *path, char resolved_path []);
 
 #endif
 /*
index 02bd31b9bf3ea71ad15d03afba49ffce0e50f222..d7982e48dc6cb10ad744c9660dc1f2cafe14afd4 100644 (file)
@@ -31,7 +31,7 @@
 #include "SAPI.h"
 
 /*
- * _php3_checkuid
+ * php_checkuid
  *
  * This function has four modes:
  * 
@@ -40,7 +40,7 @@
  * 2 - if file does not exist, check directory
  * 3 - only check directory (needed for mkdir)
  */
-PHPAPI int _php3_checkuid(const char *fn, int mode) {
+PHPAPI int php_checkuid(const char *fn, int mode) {
        struct stat sb;
        int ret;
        long uid=0L, duid=0L;
@@ -108,7 +108,7 @@ PHPAPI int _php3_checkuid(const char *fn, int mode) {
 }
 
 
-PHPAPI char *_php3_get_current_user()
+PHPAPI char *php_get_current_user()
 {
 #if CGI_BINARY || USE_SAPI || FHTTPD
        struct stat statbuf;
index 3ae320b46d1843cc21d23087f9d5a63f644278ca..8fba1db8c5fe78befbabb69414770e38ff541f64 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _SAFE_MODE_H_
 #define _SAFE_MODE_H_
 
-extern PHPAPI int _php3_checkuid(const char *filename, int mode);
-extern PHPAPI char *_php3_get_current_user(void);
+extern PHPAPI int php_checkuid(const char *filename, int mode);
+extern PHPAPI char *php_get_current_user(void);
 
 #endif
index da74b254580866bcceb699fbbe99b02670b057d7..034c6bd8376edde17ea82e139d5fd8f0eb2853e3 100644 (file)
@@ -31,9 +31,9 @@
 #define S_ISDIR(mode)   (((mode)&S_IFMT) == S_IFDIR)
 #endif
 
-char *_php3_realpath(char *path, char resolved_path[]);
+char *php_realpath(char *path, char resolved_path[]);
 
-char *_php3_realpath(char *path, char resolved_path []) {
+char *php_realpath(char *path, char resolved_path []) {
        char path_construction[MAXPATHLEN];     /* We build the result in here */
        char *writepos;                                                 /* Position to write next char */
 
index 1ffaba3d259d295b20bae215a74bde73b535ef88..1f0757009df72413ae89370affa9b779f361341f 100644 (file)
@@ -418,15 +418,15 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
        }
        /* If for some reason the CGI interface is not setting the
           PATH_TRANSLATED correctly, SG(request_info).path_translated is NULL.
-          We still call php3_fopen_for_parser, because if you set doc_root
+          We still call php_fopen_primary_script, because if you set doc_root
           or user_dir configuration directives, PATH_INFO is used to construct
-          the filename as a side effect of php3_fopen_for_parser.
+          the filename as a side effect of php_fopen_primary_script.
         */
        if(cgi) {
                SG(request_info).path_translated = getenv("PATH_TRANSLATED");
        }
        if (cgi || SG(request_info).path_translated) {
-               file_handle.handle.fp = php3_fopen_for_parser();
+               file_handle.handle.fp = php_fopen_primary_script();
                file_handle.filename = SG(request_info).path_translated;
        }
 
index aada017b2bef03021165bcc7cf0c14c933b34aea..0950b74e363bc61c067dfab3718efbc094e49215 100644 (file)
@@ -341,7 +341,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
         */
        SETSTRING( SG(request_info).path_translated, pathTranslated );
        getcwd(cwd,MAXPATHLEN);
-       file_handle.handle.fp = php3_fopen_for_parser();
+       file_handle.handle.fp = php_fopen_primary_script();
        chdir(cwd);
        file_handle.filename = SG(request_info).path_translated;
        file_handle.free_filename = 0;