summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-10-21 08:52:46 +0200
committerOndřej Surý <ondrej@sury.org>2010-10-21 08:52:46 +0200
commit01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch)
tree6460876d356113fa7053df36f2aa00baa7db24a9 /TSRM
parent855a09f4eded707941180c9d90acd17c25e29447 (diff)
downloadphp-01fcdff3849c3691d9aaeaab735846ab6d8895ca.tar.gz
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/config.w327
-rw-r--r--TSRM/tsrm_virtual_cwd.c19
-rw-r--r--TSRM/tsrm_win32.c4
3 files changed, 13 insertions, 17 deletions
diff --git a/TSRM/config.w32 b/TSRM/config.w32
index 0098b0e8f..8a3b49db8 100644
--- a/TSRM/config.w32
+++ b/TSRM/config.w32
@@ -1,10 +1,5 @@
// vim:ft=javascript
-// $Id: config.w32 147168 2003-12-22 15:01:05Z wez $
+// $Id: config.w32 298737 2010-04-28 22:25:31Z pajoye $
-if (CHECK_HEADER_ADD_INCLUDE("NewAPIs.h", "CFLAGS_PHP", php_usual_include_suspects)) {
- // Need to add the flag directly, since TSRM doesn't include the config
- // header
- ADD_FLAG("CFLAGS_PHP", "/DHAVE_NEWAPIS_H=1");
-}
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c");
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 251fd2f8d..0ff3c64f9 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c 294520 2010-02-04 09:57:30Z pajoye $ */
+/* $Id: tsrm_virtual_cwd.c 300276 2010-06-08 13:27:30Z tony2001 $ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -298,19 +298,19 @@ static int php_is_file_ok(const cwd_state *state) /* {{{ */
}
/* }}} */
-static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
+static void cwd_globals_ctor(virtual_cwd_globals *cwd_g TSRMLS_DC) /* {{{ */
{
- CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
- cwd_globals->realpath_cache_size = 0;
- cwd_globals->realpath_cache_size_limit = REALPATH_CACHE_SIZE;
- cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL;
- memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache));
+ CWD_STATE_COPY(&cwd_g->cwd, &main_cwd_state);
+ cwd_g->realpath_cache_size = 0;
+ cwd_g->realpath_cache_size_limit = REALPATH_CACHE_SIZE;
+ cwd_g->realpath_cache_ttl = REALPATH_CACHE_TTL;
+ memset(cwd_g->realpath_cache, 0, sizeof(cwd_g->realpath_cache));
}
/* }}} */
-static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
+static void cwd_globals_dtor(virtual_cwd_globals *cwd_g TSRMLS_DC) /* {{{ */
{
- CWD_STATE_FREE(&cwd_globals->cwd);
+ CWD_STATE_FREE(&cwd_g->cwd);
realpath_cache_clean(TSRMLS_C);
}
/* }}} */
@@ -1525,6 +1525,7 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
/* rename on windows will fail if newname already exists.
MoveFileEx has to be used */
#ifdef TSRM_WIN32
+ /* MoveFileEx returns 0 on failure, other way 'round for this function */
retval = (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0) ? -1 : 0;
#else
retval = rename(oldname, newname);
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 2267488a9..24314c896 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_win32.c 294728 2010-02-07 21:09:19Z pajoye $ */
+/* $Id: tsrm_win32.c 294532 2010-02-04 15:34:19Z pajoye $ */
#include <stdio.h>
#include <fcntl.h>
@@ -146,7 +146,7 @@ PSID tsrm_win32_get_token_sid(HANDLE hToken)
PSID *ppsid = &sid;
DWORD sid_len;
PSID pResultSid = NULL;
-
+
/* Get the actual size of the TokenUser structure */
if (!GetTokenInformation(
hToken, TokenUser, (LPVOID) pTokenUser, 0, &dwLength)) {