summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/cpdf/cpdf.c2
-rw-r--r--ext/db/db.c4
-rw-r--r--ext/dbase/dbase.c8
-rw-r--r--ext/filepro/filepro.c12
-rw-r--r--ext/gd/gd.c18
-rw-r--r--ext/hyperwave/hw.c2
-rw-r--r--ext/mysql/php_mysql.c2
-rw-r--r--ext/oci8/oci8.c4
-rw-r--r--ext/posix/posix.c2
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/file.c26
-rw-r--r--ext/standard/filestat.c18
-rw-r--r--ext/standard/fsock.c14
-rw-r--r--ext/standard/fsock.h10
-rw-r--r--ext/standard/image.c2
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/link.c8
-rw-r--r--ext/zlib/zlib.c24
19 files changed, 86 insertions, 86 deletions
diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c
index cacb476ef5..c19530d9fc 100644
--- a/ext/cpdf/cpdf.c
+++ b/ext/cpdf/cpdf.c
@@ -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;
}
diff --git a/ext/db/db.c b/ext/db/db.c
index c26d3aef57..7dff357e77 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -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;
}
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index 475e20a3b8..f8cb7b91c8 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -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;
}
diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c
index 44601f9e22..caa32669df 100644
--- a/ext/filepro/filepro.c
+++ b/ext/filepro/filepro.c
@@ -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;
}
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7296b3e919..8b989a8620 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -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);
}
}
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 627bdf7f21..a8f7c747d2 100644
--- a/ext/hyperwave/hw.c
+++ b/ext/hyperwave/hw.c
@@ -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;
}
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 7c65958403..279fe37722 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -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);
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index a29124b00b..b6f8e4cf89 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -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;
}
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 8a26d0957a..248c08e62f 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -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);
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 8538ab0c66..77264d4911 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -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;
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 4f40dd2d98..0717badf87 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -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;
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 60e0b30d9a..d4cd4fae3d 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -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;
}
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 39303afe6a..4a33ea7ff5 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -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);
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 7366859f39..bbb22c9f1f 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -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);
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index cc0a360e25..a833f9be44 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -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);
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 5c1578faf6..06dcd0228b 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -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);
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 540ae518d1..f790b35446 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -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) {
diff --git a/ext/standard/link.c b/ext/standard/link.c
index f296a2dbcb..1acbcdc4c4 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -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;
}
/* }}} */
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 6043d32279..a42a1bcc95 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -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;