diff options
| author | Sean Finney <seanius@debian.org> | 2009-04-10 14:09:48 +0200 |
|---|---|---|
| committer | Sean Finney <seanius@debian.org> | 2009-04-10 14:09:48 +0200 |
| commit | cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (patch) | |
| tree | 1315c623bb7d9dfa8d366fa9cd2c6834ceeb5da5 /TSRM | |
| parent | 9ea47aab740772adf0c69d8c94b208a464e599ea (diff) | |
| download | php-cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f.tar.gz | |
Imported Upstream version 5.2.9.dfsg.1upstream/5.2.9.dfsg.1
Diffstat (limited to 'TSRM')
| -rw-r--r-- | TSRM/TSRM.c | 2 | ||||
| -rw-r--r-- | TSRM/TSRM.h | 2 | ||||
| -rw-r--r-- | TSRM/tsrm_nw.c | 4 | ||||
| -rw-r--r-- | TSRM/tsrm_nw.h | 2 | ||||
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 15 | ||||
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 4 | ||||
| -rw-r--r-- | TSRM/tsrm_win32.c | 24 | ||||
| -rw-r--r-- | TSRM/tsrm_win32.h | 4 |
8 files changed, 31 insertions, 26 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index f1182e6f4..dfa06fe1d 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski | + | Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski | | This source file is subject to the TSRM license, that is bundled | | with this package in the file LICENSE | +----------------------------------------------------------------------+ diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 4a73c3487..8df5b3766 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski | + | Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski | | This source file is subject to the TSRM license, that is bundled | | with this package in the file LICENSE | +----------------------------------------------------------------------+ diff --git a/TSRM/tsrm_nw.c b/TSRM/tsrm_nw.c index 435d7293d..f832dae8b 100644 --- a/TSRM/tsrm_nw.c +++ b/TSRM/tsrm_nw.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_nw.c,v 1.8.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */ +/* $Id: tsrm_nw.c,v 1.8.2.1.2.3 2008/12/31 11:17:31 sebastian Exp $ */ #include <stdlib.h> #include <stdio.h> diff --git a/TSRM/tsrm_nw.h b/TSRM/tsrm_nw.h index 968d8a34a..e2fe4f539 100644 --- a/TSRM/tsrm_nw.h +++ b/TSRM/tsrm_nw.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index a69d445cf..9ef6ef4e6 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.38 2007/12/31 07:20:02 sebastian Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.41 2008/12/31 11:17:31 sebastian Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -491,6 +491,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func int use_relative_path = 0; #ifdef TSRM_WIN32 int is_unc; + int exists; #endif TSRMLS_FETCH(); @@ -589,6 +590,7 @@ no_realpath: CWD_STATE_COPY(&old_state, state); #ifdef TSRM_WIN32 + exists = (use_realpath != CWD_EXPAND); ret = 0; is_unc = 0; if (path_length >= 2 && path[1] == ':') { @@ -696,13 +698,16 @@ no_realpath: ptr_length = length; FindClose(hFind); ret = 0; - } else if (use_realpath == CWD_REALPATH) { + } else { if (is_unc) { /* skip share name */ is_unc--; ret = 0; } else { - ret = 1; + exists = 0; + if (use_realpath == CWD_REALPATH) { + ret = 1; + } } } } @@ -742,7 +747,7 @@ no_realpath: /* Store existent file in realpath cache. */ #ifdef TSRM_WIN32 - if (use_cache && !is_unc) { + if (use_cache && !is_unc && exists) { #else if (use_cache && (use_realpath == CWD_REALPATH)) { #endif diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index aae37fae0..4d99f16d0 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.9 2007/12/31 07:20:02 sebastian Exp $ */ +/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.10 2008/12/31 11:17:32 sebastian Exp $ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 804c809cc..6d9eed4ed 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.c,v 1.27.2.1.2.8 2007/12/31 07:20:02 sebastian Exp $ */ +/* $Id: tsrm_win32.c,v 1.27.2.1.2.11 2008/12/31 11:17:32 sebastian Exp $ */ #include <stdio.h> #include <fcntl.h> @@ -88,7 +88,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode) { if (mode == 1 /*X_OK*/) { #if 1 - /* This code is not supported by Windows 98, + /* This code is not supported by Windows 98, * but we don't support it anymore */ DWORD type; @@ -96,7 +96,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode) #else SHFILEINFO sfi; - return access(pathname, 0) == 0 && + return access(pathname, 0) == 0 && SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1; #endif } else { @@ -109,22 +109,22 @@ static process_pair *process_get(FILE *stream TSRMLS_DC) { process_pair *ptr; process_pair *newptr; - + for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) { if (ptr->stream == stream) { break; } } - + if (ptr < (TWG(process) + TWG(process_size))) { return ptr; } - + newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair)); if (newptr == NULL) { return NULL; } - + TWG(process) = newptr; ptr = newptr + TWG(process_size); TWG(process_size)++; @@ -136,7 +136,7 @@ static shm_pair *shm_get(int key, void *addr) shm_pair *ptr; shm_pair *newptr; TSRMLS_FETCH(); - + for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) { if (!ptr->descriptor) { continue; @@ -151,12 +151,12 @@ static shm_pair *shm_get(int key, void *addr) if (ptr < (TWG(shm) + TWG(shm_size))) { return ptr; } - + newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair)); if (newptr == NULL) { return NULL; } - + TWG(shm) = newptr; ptr = newptr + TWG(shm_size); TWG(shm_size)++; @@ -195,7 +195,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) { return NULL; } - + memset(&startup, 0, sizeof(STARTUPINFO)); memset(&process, 0, sizeof(PROCESS_INFORMATION)); diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 757b97cb6..7e1ca6723 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.h,v 1.19.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */ +/* $Id: tsrm_win32.h,v 1.19.2.1.2.3 2008/12/31 11:17:32 sebastian Exp $ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H |
