cvs: /php4 config.guess config.sub configuration-parser.y fopen-wrappers.c fopen-wrappers.h internal_functions_registry.h ltconfig ltmain.sh main.c
main.h php.h php3_realpath.c php_realpath.h safe_mode.c safe_mode.h /php4/ext/cpdf cpdf.c /php4/ext/db db.c /php4/ext/dbase dbase.c /php4/ext/filepro
filepro.c /php4/ext/gd gd.c /php4/ext/hyperwave hw.c /php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c /php4/ext/posix posix.c /php4/ext/standard
basic_functions.c dir.c file.c filestat.c fsock.c fsock.h image.c iptc.c link.c /php4/ext/zlib zlib.c /php4/sapi/cgi cgi_main.c /php4/sapi/servlet
servlet.c
| From: | Zeev Suraski | Date: | Fri, 17 Dec 1999 19:17:22 +0000 |
| Subject: | cvs: /php4 config.guess config.sub configuration-parser.y fopen-wrappers.c fopen-wrappers.h internal_functions_registry.h ltconfig ltmain.sh main.c main.h php.h php3_realpath.c php_realpath.h safe_mode.c safe_mode.h /php4/ext/cpdf cpdf.c /php4/ext/db db.c /php4/ext/dbase dbase.c /php4/ext/filepro filepro.c /php4/ext/gd gd.c /php4/ext/hyperwave hw.c /php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c /php4/ext/posix posix.c /php4/ext/standard basic_functions.c dir.c file.c filestat.c fsock.c fsock.h image.c iptc.c link.c /php4/ext/zlib zlib.c /php4/sapi/cgi cgi_main.c /php4/sapi/servlet servlet.c |
||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8077@lists.php.net to get a copy of this message | ||
zeev Fri Dec 17 14:17:22 1999 EDT
Modified files:
/php4 config.guess config.sub configuration-parser.y
fopen-wrappers.c fopen-wrappers.h
internal_functions_registry.h ltconfig ltmain.sh main.c
main.h php.h php3_realpath.c php_realpath.h safe_mode.c
safe_mode.h
/php4/ext/cpdf cpdf.c
/php4/ext/db db.c
/php4/ext/dbase dbase.c
/php4/ext/filepro filepro.c
/php4/ext/gd gd.c
/php4/ext/hyperwave hw.c
/php4/ext/mysql php_mysql.c
/php4/ext/oci8 oci8.c
/php4/ext/posix posix.c
/php4/ext/standard basic_functions.c dir.c file.c filestat.c
fsock.c fsock.h image.c iptc.c link.c
/php4/ext/zlib zlib.c
/php4/sapi/cgi cgi_main.c
/php4/sapi/servlet servlet.c
Log:
More php3_ annihilation
Index: php4/config.guess
diff -u php4/config.guess:1.6 php4/config.guess:1.7
--- php4/config.guess:1.6 Fri Nov 26 09:57:50 1999
+++ php4/config.guess Fri Dec 17 14:16:33 1999
@@ -618,12 +618,12 @@
echo
echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'-unknown-gnuecho
${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 @@
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: php4/config.sub
diff -u php4/config.sub:1.6 php4/config.sub:1.7
--- php4/config.sub:1.6 Fri Nov 26 09:57:50 1999
+++ php4/config.sub Fri Dec 17 14:16:33 1999
@@ -172,7 +172,7 @@
| 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 @@
| 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: php4/configuration-parser.y
diff -u php4/configuration-parser.y:1.22 php4/configuration-parser.y:1.23
--- php4/configuration-parser.y:1.22 Wed Dec 8 17:22:19 1999
+++ php4/configuration-parser.y Fri Dec 17 14:16:33 1999
@@ -19,7 +19,7 @@
-/* $Id: configuration-parser.y,v 1.22 1999/12/08 22:22:19 zeev Exp $ */
+/* $Id: configuration-parser.y,v 1.23 1999/12/17 19:16:33 zeev Exp $ */
#define DEBUG_CFG_PARSER 1
#include "php.h"
@@ -145,7 +145,7 @@
}
-int php3_init_config(void)
+int php_init_config(void)
{
PLS_FETCH();
@@ -201,7 +201,7 @@
}
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 @@
}
-int php3_shutdown_config(void)
+int php_shutdown_config(void)
{
zend_hash_destroy(&configuration_hash);
return SUCCESS;
Index: php4/fopen-wrappers.c
diff -u php4/fopen-wrappers.c:1.33 php4/fopen-wrappers.c:1.34
--- php4/fopen-wrappers.c:1.33 Mon Dec 6 10:30:44 1999
+++ php4/fopen-wrappers.c Fri Dec 17 14:16:33 1999
@@ -16,7 +16,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.33 1999/12/06 15:30:44 zeev Exp $ */
+/* $Id: fopen-wrappers.c,v 1.34 1999/12/17 19:16:33 zeev Exp $ */
/* Synced with php3 revision 1.66 1999-06-18 [ssb] */
@@ -89,7 +89,7 @@
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 @@
}
/* 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_open_basedir(char *path)
+PHPAPI int php_check_open_basedir(char *path)
{
PLS_FETCH();
@@ -165,7 +165,7 @@
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 @@
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 @@
#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 @@
* 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 @@
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 @@
} 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 @@
}
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 @@
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 @@
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: php4/fopen-wrappers.h
diff -u php4/fopen-wrappers.h:1.10 php4/fopen-wrappers.h:1.11
--- php4/fopen-wrappers.h:1.10 Tue Nov 30 15:18:06 1999
+++ php4/fopen-wrappers.h Fri Dec 17 14:16:33 1999
@@ -15,7 +15,7 @@
| Authors: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.h,v 1.10 1999/11/30 20:18:06 andi Exp $ */
+/* $Id: fopen-wrappers.h,v 1.11 1999/12/17 19:16:33 zeev Exp $ */
/* Synced with php3 revision 1.25 1999-06-16 [ssb] */
@@ -46,11 +46,11 @@
#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))
@@ -66,17 +66,17 @@
#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: php4/internal_functions_registry.h
diff -u php4/internal_functions_registry.h:1.3 php4/internal_functions_registry.h:1.4
--- php4/internal_functions_registry.h:1.3 Fri Jul 16 09:12:41 1999
+++ php4/internal_functions_registry.h Fri Dec 17 14:16:33 1999
@@ -18,23 +18,23 @@
*/
-/* $Id: internal_functions_registry.h,v 1.3 1999/07/16 13:12:41 zeev Exp $ */
+/* $Id: internal_functions_registry.h,v 1.4 1999/12/17 19:16:33 zeev Exp $ */
#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: php4/ltconfig
diff -u php4/ltconfig:1.8 php4/ltconfig:1.9
--- php4/ltconfig:1.8 Tue Nov 30 20:26:02 1999
+++ php4/ltconfig Fri Dec 17 14:16:33 1999
@@ -1188,8 +1188,8 @@
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
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 @@
*)
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 @@
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: php4/ltmain.sh
diff -u php4/ltmain.sh:1.8 php4/ltmain.sh:1.9
--- php4/ltmain.sh:1.8 Tue Nov 30 20:26:02 1999
+++ php4/ltmain.sh Fri Dec 17 14:16:33 1999
@@ -1162,7 +1162,7 @@
*.o | *.obj | *.a | *.lib)
# A standard object.
- libobjs="$libobjs $arg"
+ objs="$objs $arg"
;;
*.lo)
@@ -1796,94 +1796,6 @@
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 @@
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."
Index: php4/main.c
diff -u php4/main.c:1.158 php4/main.c:1.159
--- php4/main.c:1.158 Wed Dec 15 16:20:34 1999
+++ php4/main.c Fri Dec 17 14:16:33 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.158 1999/12/15 21:20:34 zeev Exp $ */
+/* $Id: main.c,v 1.159 1999/12/17 19:16:33 zeev Exp $ */
#include <stdio.h>
@@ -289,7 +289,7 @@
#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 @@
#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 @@
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 @@
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 @@
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 @@
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 void php3_config_ini_shutdown(void)
{
- php3_shutdown_config();
+ php_shutdown_config();
}
Index: php4/main.h
diff -u php4/main.h:1.13 php4/main.h:1.14
--- php4/main.h:1.13 Tue Dec 7 15:49:01 1999
+++ php4/main.h Fri Dec 17 14:16:34 1999
@@ -18,7 +18,7 @@
*/
-/* $Id: main.h,v 1.13 1999/12/07 20:49:01 rubys Exp $ */
+/* $Id: main.h,v 1.14 1999/12/17 19:16:34 zeev Exp $ */
#ifndef _MAIN_H
@@ -46,11 +46,11 @@
/* 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: php4/php.h
diff -u php4/php.h:1.50 php4/php.h:1.51
--- php4/php.h:1.50 Tue Dec 7 15:49:01 1999
+++ php4/php.h Fri Dec 17 14:16:34 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.50 1999/12/07 20:49:01 rubys Exp $ */
+/* $Id: php.h,v 1.51 1999/12/17 19:16:34 zeev Exp $ */
#ifndef _PHP_H
#define _PHP_H
@@ -263,21 +263,21 @@
#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 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: php4/php3_realpath.c
diff -u php4/php3_realpath.c:1.3 php4/php3_realpath.c:1.4
--- php4/php3_realpath.c:1.3 Fri Jul 16 09:12:42 1999
+++ php4/php3_realpath.c Fri Dec 17 14:16:34 1999
@@ -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: php4/php_realpath.h
diff -u php4/php_realpath.h:1.1 php4/php_realpath.h:1.2
--- php4/php_realpath.h:1.1 Sat Dec 4 14:15:41 1999
+++ php4/php_realpath.h Fri Dec 17 14:16:34 1999
@@ -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: php4/safe_mode.c
diff -u php4/safe_mode.c:1.8 php4/safe_mode.c:1.9
--- php4/safe_mode.c:1.8 Mon Aug 2 15:16:34 1999
+++ php4/safe_mode.c Fri Dec 17 14:16:34 1999
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.c,v 1.8 1999/08/02 19:16:34 zeev Exp $ */
+/* $Id: safe_mode.c,v 1.9 1999/12/17 19:16:34 zeev Exp $ */
#include "php.h"
@@ -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 char *_php3_get_current_user()
+PHPAPI char *php_get_current_user()
{
#if CGI_BINARY || USE_SAPI || FHTTPD
struct stat statbuf;
Index: php4/safe_mode.h
diff -u php4/safe_mode.h:1.1 php4/safe_mode.h:1.2
--- php4/safe_mode.h:1.1 Wed Apr 7 17:02:43 1999
+++ php4/safe_mode.h Fri Dec 17 14:16:34 1999
@@ -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: php4/ext/cpdf/cpdf.c
diff -u php4/ext/cpdf/cpdf.c:1.3 php4/ext/cpdf/cpdf.c:1.4
--- php4/ext/cpdf/cpdf.c:1.3 Sat Dec 4 14:15:44 1999
+++ php4/ext/cpdf/cpdf.c Fri Dec 17 14:16:35 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cpdf.c,v 1.3 1999/12/04 19:15:44 sas Exp $ */
+/* $Id: cpdf.c,v 1.4 1999/12/17 19:16:35 zeev Exp $ */
/* cpdflib.h -- C language API definitions for ClibPDF library
* Copyright (C) 1998 FastIO Systems, All Rights Reserved.
*/
@@ -2196,7 +2196,7 @@
buffer = cpdf_getBufferForPDF(pdf, &lenght);
php3_header();
- php3_write(buffer, lenght);
+ php_write(buffer, lenght);
RETURN_TRUE;
}
Index: php4/ext/db/db.c
diff -u php4/ext/db/db.c:1.13 php4/ext/db/db.c:1.14
--- php4/ext/db/db.c:1.13 Sat Dec 4 14:15:46 1999
+++ php4/ext/db/db.c Fri Dec 17 14:16:36 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: db.c,v 1.13 1999/12/04 19:15:46 sas Exp $ */
+/* $Id: db.c,v 1.14 1999/12/17 19:16:36 zeev Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
# include "dl/phpdl.h"
@@ -293,11 +293,11 @@
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: php4/ext/dbase/dbase.c
diff -u php4/ext/dbase/dbase.c:1.11 php4/ext/dbase/dbase.c:1.12
--- php4/ext/dbase/dbase.c:1.11 Sun Dec 12 05:49:24 1999
+++ php4/ext/dbase/dbase.c Fri Dec 17 14:16:37 1999
@@ -123,11 +123,11 @@
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 @@
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: php4/ext/filepro/filepro.c
diff -u php4/ext/filepro/filepro.c:1.8 php4/ext/filepro/filepro.c:1.9
--- php4/ext/filepro/filepro.c:1.8 Sun Dec 12 05:51:44 1999
+++ php4/ext/filepro/filepro.c Fri Dec 17 14:16:39 1999
@@ -202,11 +202,11 @@
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 @@
/* 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 @@
/* 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: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.28 php4/ext/gd/gd.c:1.29
--- php4/ext/gd/gd.c:1.28 Sun Dec 12 05:53:45 1999
+++ php4/ext/gd/gd.c Fri Dec 17 14:16:40 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.28 1999/12/12 10:53:45 sas Exp $ */
+/* $Id: gd.c,v 1.29 1999/12/17 19:16:40 zeev Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -308,7 +308,7 @@
#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 @@
#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 @@
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 @@
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 @@
#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 @@
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 @@
}
#endif
while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
- php3_write(buf, b);
+ php_write(buf, b);
}
}
Index: php4/ext/hyperwave/hw.c
diff -u php4/ext/hyperwave/hw.c:1.29 php4/ext/hyperwave/hw.c:1.30
--- php4/ext/hyperwave/hw.c:1.29 Wed Dec 15 14:10:53 1999
+++ php4/ext/hyperwave/hw.c Fri Dec 17 14:16:41 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hw.c,v 1.29 1999/12/15 19:10:53 steinm Exp $ */
+/* $Id: hw.c,v 1.30 1999/12/17 19:16:41 zeev Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
@@ -2514,7 +2514,7 @@
}
if(php3_header())
- php3_write(ptr->data, ptr->size);
+ php_write(ptr->data, ptr->size);
RETURN_TRUE;
}
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.13 php4/ext/mysql/php_mysql.c:1.14
--- php4/ext/mysql/php_mysql.c:1.13 Sun Dec 5 05:29:04 1999
+++ php4/ext/mysql/php_mysql.c Fri Dec 17 14:16:42 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.13 1999/12/05 10:29:04 ssb Exp $ */
+/* $Id: php_mysql.c,v 1.14 1999/12/17 19:16:42 zeev Exp $ */
/* TODO:
@@ -377,7 +377,7 @@
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: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.43 php4/ext/oci8/oci8.c:1.44
--- php4/ext/oci8/oci8.c:1.43 Thu Dec 9 06:02:40 1999
+++ php4/ext/oci8/oci8.c Fri Dec 17 14:16:45 1999
@@ -22,7 +22,7 @@
#define OCI_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */
-/* $Id: oci8.c,v 1.43 1999/12/09 11:02:40 thies Exp $ */
+/* $Id: oci8.c,v 1.44 1999/12/17 19:16:45 zeev Exp $ */
/* TODO list:
*
@@ -2532,7 +2532,7 @@
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 @@
}
if (filename && *filename) {
- if (_php3_check_open_basedir(filename)) {
+ if (php_check_open_basedir(filename)) {
goto bail;
}
Index: php4/ext/posix/posix.c
diff -u php4/ext/posix/posix.c:1.2 php4/ext/posix/posix.c:1.3
--- php4/ext/posix/posix.c:1.2 Sat Dec 4 14:16:01 1999
+++ php4/ext/posix/posix.c Fri Dec 17 14:16:46 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.2 1999/12/04 19:16:01 sas Exp $ */
+/* $Id: posix.c,v 1.3 1999/12/17 19:16:46 zeev Exp $ */
#include "php.h"
@@ -138,7 +138,7 @@
static PHP_MINFO_FUNCTION(posix)
{
- PUTS("$Revision: 1.2 $\n");
+ PUTS("$Revision: 1.3 $\n");
}
/* {{{ proto int posix_kill(int pid, int sig)
@@ -604,7 +604,7 @@
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: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.137 php4/ext/standard/basic_functions.c:1.138
--- php4/ext/standard/basic_functions.c:1.137 Thu Dec 16 18:47:10 1999
+++ php4/ext/standard/basic_functions.c Fri Dec 17 14:16:47 1999
@@ -167,8 +167,8 @@
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 @@
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(get_current_user)
{
- RETURN_STRING(_php3_get_current_user(),1);
+ RETURN_STRING(php_get_current_user(),1);
}
@@ -959,7 +959,7 @@
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 @@
fclose(logfile);
break;
default:
- php3_log_err(message);
+ php_log_err(message);
break;
}
return SUCCESS;
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.18 php4/ext/standard/dir.c:1.19
--- php4/ext/standard/dir.c:1.18 Sun Dec 5 11:25:31 1999
+++ php4/ext/standard/dir.c Fri Dec 17 14:16:47 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.18 1999/12/05 16:25:31 sas Exp $ */
+/* $Id: dir.c,v 1.19 1999/12/17 19:16:47 zeev Exp $ */
/* {{{ includes/startup/misc */
@@ -151,7 +151,7 @@
}
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: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.47 php4/ext/standard/file.c:1.48
--- php4/ext/standard/file.c:1.47 Sat Dec 11 14:51:04 1999
+++ php4/ext/standard/file.c Fri Dec 17 14:16:47 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.47 1999/12/11 19:51:04 andrei Exp $ */
+/* $Id: file.c,v 1.48 1999/12/17 19:16:47 zeev Exp $ */
/* Synced with php3 revision 1.218 1999-06-16 [ssb] */
@@ -412,11 +412,11 @@
}
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 @@
}
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 @@
* 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 @@
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 @@
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 @@
/*
* 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 @@
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 @@
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: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.15 php4/ext/standard/filestat.c:1.16
--- php4/ext/standard/filestat.c:1.15 Sun Dec 12 11:48:54 1999
+++ php4/ext/standard/filestat.c Fri Dec 17 14:16:47 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.15 1999/12/12 16:48:54 sas Exp $ */
+/* $Id: filestat.c,v 1.16 1999/12/17 19:16:47 zeev Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -142,7 +142,7 @@
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 @@
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 @@
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 @@
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 @@
}
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: php4/ext/standard/fsock.c
diff -u php4/ext/standard/fsock.c:1.30 php4/ext/standard/fsock.c:1.31
--- php4/ext/standard/fsock.c:1.30 Sun Dec 5 11:25:31 1999
+++ php4/ext/standard/fsock.c Fri Dec 17 14:16:47 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.c,v 1.30 1999/12/05 16:25:31 sas Exp $ */
+/* $Id: fsock.c,v 1.31 1999/12/17 19:16:47 zeev Exp $ */
/* Synced with php3 revision 1.121 1999-06-18 [ssb] */
/* Synced with php3 revision 1.133 1999-07-21 [sas] */
@@ -484,7 +484,7 @@
#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 @@
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 @@
* 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 @@
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 @@
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: php4/ext/standard/fsock.h
diff -u php4/ext/standard/fsock.h:1.17 php4/ext/standard/fsock.h:1.18
--- php4/ext/standard/fsock.h:1.17 Sun Dec 5 05:29:06 1999
+++ php4/ext/standard/fsock.h Fri Dec 17 14:16:47 1999
@@ -27,7 +27,7 @@
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.h,v 1.17 1999/12/05 10:29:06 ssb Exp $ */
+/* $Id: fsock.h,v 1.18 1999/12/17 19:16:47 zeev Exp $ */
/* Synced with php3 revision 1.24 1999-06-18 [ssb] */
@@ -61,14 +61,14 @@
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: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.8 php4/ext/standard/image.c:1.9
--- php4/ext/standard/image.c:1.8 Mon Dec 13 23:32:54 1999
+++ php4/ext/standard/image.c Fri Dec 17 14:16:47 1999
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf |
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.8 1999/12/14 04:32:54 thies Exp $ */
+/* $Id: image.c,v 1.9 1999/12/17 19:16:47 zeev Exp $ */
/*
* Based on Daniel Schmitt's imageinfo.c which carried the following
* Copyright notice.
@@ -336,7 +336,7 @@
}
/* 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: php4/ext/standard/iptc.c
diff -u php4/ext/standard/iptc.c:1.9 php4/ext/standard/iptc.c:1.10
--- php4/ext/standard/iptc.c:1.9 Mon Dec 13 22:49:24 1999
+++ php4/ext/standard/iptc.c Fri Dec 17 14:16:47 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iptc.c,v 1.9 1999/12/14 03:49:24 thies Exp $ */
+/* $Id: iptc.c,v 1.10 1999/12/17 19:16:47 zeev Exp $ */
/*
* Functions to parse & compse IPTC data.
@@ -195,7 +195,7 @@
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: php4/ext/standard/link.c
diff -u php4/ext/standard/link.c:1.13 php4/ext/standard/link.c:1.14
--- php4/ext/standard/link.c:1.13 Sat Dec 4 14:16:03 1999
+++ php4/ext/standard/link.c Fri Dec 17 14:16:47 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: link.c,v 1.13 1999/12/04 19:16:03 sas Exp $ */
+/* $Id: link.c,v 1.14 1999/12/17 19:16:47 zeev Exp $ */
#include "php.h"
#include "php_filestat.h"
@@ -113,7 +113,7 @@
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 @@
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 @@
}
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 @@
RETURN_FALSE;
}
/* Clear stat cache */
- php3_clearstatcache(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
RETURN_TRUE;
}
/* }}} */
Index: php4/ext/zlib/zlib.c
diff -u php4/ext/zlib/zlib.c:1.25 php4/ext/zlib/zlib.c:1.26
--- php4/ext/zlib/zlib.c:1.25 Sun Dec 12 06:02:24 1999
+++ php4/ext/zlib/zlib.c Fri Dec 17 14:16:48 1999
@@ -16,7 +16,7 @@
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.25 1999/12/12 11:02:24 sas Exp $ */
+/* $Id: zlib.c,v 1.26 1999/12/17 19:16:48 zeev Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -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 @@
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 @@
/* 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 @@
} 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 @@
}
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: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.9 php4/sapi/cgi/cgi_main.c:1.10
--- php4/sapi/cgi/cgi_main.c:1.9 Sun Dec 5 11:25:32 1999
+++ php4/sapi/cgi/cgi_main.c Fri Dec 17 14:16:49 1999
@@ -418,15 +418,15 @@
}
/* 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: php4/sapi/servlet/servlet.c
diff -u php4/sapi/servlet/servlet.c:1.5 php4/sapi/servlet/servlet.c:1.6
--- php4/sapi/servlet/servlet.c:1.5 Sun Dec 5 23:58:54 1999
+++ php4/sapi/servlet/servlet.c Fri Dec 17 14:16:50 1999
@@ -341,7 +341,7 @@
*/
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;