diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:13 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:13 -0400 |
commit | 0a36161e13484a99ccf69bb38f206462d27cc6d6 (patch) | |
tree | d5107db4b7369603ac7c753829e8972ee74949f7 /TSRM | |
parent | ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (diff) | |
download | php-0a36161e13484a99ccf69bb38f206462d27cc6d6.tar.gz |
Imported Upstream version 5.1.2upstream/5.1.2
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/LICENSE | 2 | ||||
-rw-r--r-- | TSRM/TSRM.c | 2 | ||||
-rw-r--r-- | TSRM/TSRM.h | 2 | ||||
-rw-r--r-- | TSRM/tsrm_config_common.h | 2 | ||||
-rw-r--r-- | TSRM/tsrm_nw.c | 8 | ||||
-rw-r--r-- | TSRM/tsrm_nw.h | 6 | ||||
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 20 | ||||
-rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 8 | ||||
-rw-r--r-- | TSRM/tsrm_win32.c | 8 | ||||
-rw-r--r-- | TSRM/tsrm_win32.h | 8 |
10 files changed, 36 insertions, 30 deletions
diff --git a/TSRM/LICENSE b/TSRM/LICENSE index 8d208476e..84b8348eb 100644 --- a/TSRM/LICENSE +++ b/TSRM/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski. +Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 208d5e95d..c07d60668 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski| + | Copyright (c) 1999-2006, 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 b2868730e..056089aa9 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski| + | Copyright (c) 1999-2006, 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_config_common.h b/TSRM/tsrm_config_common.h index bdd171e61..62a7c8efc 100644 --- a/TSRM/tsrm_config_common.h +++ b/TSRM/tsrm_config_common.h @@ -42,6 +42,8 @@ char *alloca (); #ifndef MAXPATHLEN # ifdef PATH_MAX # define MAXPATHLEN PATH_MAX +# elif defined(MAX_PATH) +# define MAXPATHLEN MAX_PATH # else # define MAXPATHLEN 256 # endif diff --git a/TSRM/tsrm_nw.c b/TSRM/tsrm_nw.c index 489a383e1..7e8301ab6 100644 --- a/TSRM/tsrm_nw.c +++ b/TSRM/tsrm_nw.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_nw.c,v 1.8 2005/08/03 13:28:14 sniper Exp $ */ +/* $Id: tsrm_nw.c,v 1.8.2.1 2006/01/01 12:50:00 sniper Exp $ */ #include <stdlib.h> #include <stdio.h> diff --git a/TSRM/tsrm_nw.h b/TSRM/tsrm_nw.h index 14af1607a..1ad9ae752 100644 --- a/TSRM/tsrm_nw.h +++ b/TSRM/tsrm_nw.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 4616952de..03f847c2a 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74 2005/08/03 13:28:14 sniper Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.4 2006/01/01 12:50:00 sniper Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -478,13 +478,14 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func #endif #if defined(TSRM_WIN32) { - char *dummy = NULL; int new_path_length; - new_path_length = GetLongPathName(path, dummy, 0) + 1; + new_path_length = GetLongPathName(path, NULL, 0); if (new_path_length == 0) { - return 1; + goto php_failed_getlongpath; } + + /* GetLongPathName already counts the \0 */ new_path = (char *) malloc(new_path_length); if (!new_path) { return 1; @@ -495,6 +496,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func path_length = new_path_length; } else { free(new_path); +php_failed_getlongpath: new_path = NULL; } } @@ -856,7 +858,9 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - virtual_file_ex(&new_state, path, NULL, 1); + if (virtual_file_ex(&new_state, path, NULL, 1)) { + return -1; + } retval = stat(new_state.cwd, buf); diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 496ded1ab..1fc54d26e 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.h,v 1.48 2005/08/03 13:28:14 sniper Exp $ */ +/* $Id: tsrm_virtual_cwd.h,v 1.48.2.1 2006/01/01 12:50:00 sniper Exp $ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 63cf7a680..f1bc3dcf3 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.c,v 1.27 2005/08/03 13:28:14 sniper Exp $ */ +/* $Id: tsrm_win32.c,v 1.27.2.1 2006/01/01 12:50:00 sniper Exp $ */ #include <stdio.h> #include <fcntl.h> diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 57abde538..5b26bb264 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | 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 | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.h,v 1.19 2005/08/03 13:28:14 sniper Exp $ */ +/* $Id: tsrm_win32.h,v 1.19.2.1 2006/01/01 12:50:00 sniper Exp $ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H |