Browse Source

- Remove redundant IS_SLASH

- Reverse config.w32.h patches
- Use IS_ABSOLUTE_PATH() in one place in fopen-wrappers.c
PHP-4.0.5
Andi Gutmans 26 years ago
parent
commit
e8e5c9d97e
  1. 3
      ext/standard/dl.c
  2. 8
      main/config.w32.h
  3. 7
      main/fopen_wrappers.c

3
ext/standard/dl.c

@ -87,9 +87,6 @@ PHP_FUNCTION(dl)
#define USING_ZTS 0
#endif
#define IS_SLASH(c) \
(((c)=='/') || ((c)=='\\'))
void php_dl(pval *file, int type, pval *return_value)
{
void *handle;

8
main/config.w32.h

@ -58,19 +58,19 @@
#if !defined(COMPILE_DL)
#define HAVE_SNMP 0
# define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/
#define DBASE 1
#define DBASE 0
#define NDBM 0
#define GDBM 0
#define BSD2 0
#define HAVE_CRYPT 0
#define HAVE_ORACLE 1
#define HAVE_ORACLE 0
#undef HAVE_ADABAS
#undef HAVE_SOLID
#ifndef COMPILE_DL_MSQL
#define HAVE_MSQL 0
#endif
#define HAVE_SYBASE 1
#define HAVE_LIBGD 1
#define HAVE_SYBASE 0
#define HAVE_LIBGD 0
#define HAVE_FILEPRO 0
#endif
/* ----------------------------------------------------------------

7
main/fopen_wrappers.c

@ -328,12 +328,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
#endif
if (PG(doc_root) && path_info) {
length = strlen(PG(doc_root));
#ifdef PHP_WIN32
/* Check for absolute path. This should really use virtual cwd macros */
if (IS_SLASH(*PG(doc_root)) || (length >= 3 && PG(doc_root)[1] == ':' && IS_SLASH(PG(doc_root)[2]))) {
#else
if (IS_SLASH(*PG(doc_root))) {
#endif
if (IS_ABSOLUTE_PATH(PG(doc_root), length)) {
filename = emalloc(length + strlen(path_info) + 2);
if (filename) {
memcpy(filename, PG(doc_root), length);

Loading…
Cancel
Save