Skip to content

Commit

Permalink
More php3_ annihilation
Browse files Browse the repository at this point in the history
  • Loading branch information
zsuraski committed Dec 17, 1999
1 parent 9ebd037 commit 02d3b39
Show file tree
Hide file tree
Showing 36 changed files with 185 additions and 272 deletions.
13 changes: 7 additions & 6 deletions config.guess
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion config.sub
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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-* )
Expand Down
2 changes: 1 addition & 1 deletion ext/cpdf/cpdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/db/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions ext/dbase/dbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions ext/filepro/filepro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
18 changes: 9 additions & 9 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion ext/hyperwave/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/mysql/php_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/oci8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -2675,7 +2675,7 @@ PHP_FUNCTION(ociwritelobtofile)
}

if (filename && *filename) {
if (_php3_check_open_basedir(filename)) {
if (php_check_open_basedir(filename)) {
goto bail;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/posix/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}


Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading

0 comments on commit 02d3b39

Please sign in to comment.