diff options
author | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
commit | bdeb220f48825642f84cdbf3ff23a30613c92e86 (patch) | |
tree | 1a6cf34d20420e4815b4becb21311a4457d84103 /TSRM | |
parent | bb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff) | |
download | php-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz |
first shot remove TSRMLS_* things
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 33 | ||||
-rw-r--r-- | TSRM/tsrm_win32.h | 6 |
2 files changed, 18 insertions, 21 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index b5bd930fd0..bc2ea51724 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -40,7 +40,7 @@ static ts_rsrc_id win32_globals_id; static tsrm_win32_globals win32_globals; #endif -static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC) +static void tsrm_win32_ctor(tsrm_win32_globals *globals) { #ifdef ZTS TSRMLS_CACHE_UPDATE; @@ -62,7 +62,7 @@ TSRMLS_CACHE_UPDATE; globals->impersonation_token_sid = NULL; } -static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC) +static void tsrm_win32_dtor(tsrm_win32_globals *globals) { shm_pair *ptr; @@ -95,18 +95,18 @@ TSRM_API void tsrm_win32_startup(void) #ifdef ZTS ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor); #else - tsrm_win32_ctor(&win32_globals TSRMLS_CC); + tsrm_win32_ctor(&win32_globals); #endif } TSRM_API void tsrm_win32_shutdown(void) { #ifndef ZTS - tsrm_win32_dtor(&win32_globals TSRMLS_CC); + tsrm_win32_dtor(&win32_globals); #endif } -char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC) +char * tsrm_win32_get_path_sid_key(const char *pathname) { PSID pSid = TWG(impersonation_token_sid); TCHAR *ptcSid = NULL; @@ -194,7 +194,7 @@ Finished: return NULL; } -TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) +TSRM_API int tsrm_win32_access(const char *pathname, int mode) { time_t t; HANDLE thread_token = NULL; @@ -217,7 +217,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) } else { if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) { real_path = (char *)malloc(MAX_PATH); - if(tsrm_realpath(pathname, real_path TSRMLS_CC) == NULL) { + if(tsrm_realpath(pathname, real_path) == NULL) { goto Finished; } pathname = real_path; @@ -281,14 +281,14 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) if (CWDG(realpath_cache_size_limit)) { t = time(0); - bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t TSRMLS_CC); + bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t); if(bucket == NULL && real_path == NULL) { /* We used the pathname directly. Call tsrm_realpath */ /* so that entry is created in realpath cache */ real_path = (char *)malloc(MAX_PATH); - if(tsrm_realpath(pathname, real_path TSRMLS_CC) != NULL) { + if(tsrm_realpath(pathname, real_path) != NULL) { pathname = real_path; - bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t TSRMLS_CC); + bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t); } } } @@ -383,7 +383,7 @@ Finished: } -static process_pair *process_get(FILE *stream TSRMLS_DC) +static process_pair *process_get(FILE *stream) { process_pair *ptr; process_pair *newptr; @@ -413,7 +413,6 @@ 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) { @@ -451,12 +450,11 @@ static HANDLE dupHandle(HANDLE fh, BOOL inherit) { TSRM_API FILE *popen(const char *command, const char *type) { - TSRMLS_FETCH(); - return popen_ex(command, type, NULL, NULL TSRMLS_CC); + return popen_ex(command, type, NULL, NULL); } -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC) +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env) { FILE *stream = NULL; int fno, type_len, read, mode; @@ -553,7 +551,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, } CloseHandle(process.hThread); - proc = process_get(NULL TSRMLS_CC); + proc = process_get(NULL); if (read) { fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode); @@ -573,9 +571,8 @@ TSRM_API int pclose(FILE *stream) { DWORD termstat = 0; process_pair *process; - TSRMLS_FETCH(); - if ((process = process_get(stream TSRMLS_CC)) == NULL) { + if ((process = process_get(stream)) == NULL) { return 0; } diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index cb636a6851..8cefb664be 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -94,15 +94,15 @@ TSRMLS_CACHE_EXTERN; #define SHM_RND FILE_MAP_WRITE #define SHM_REMAP FILE_MAP_COPY -char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC); +char * tsrm_win32_get_path_sid_key(const char *pathname ); TSRM_API void tsrm_win32_startup(void); TSRM_API void tsrm_win32_shutdown(void); -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC); +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env); TSRM_API FILE *popen(const char *command, const char *type); TSRM_API int pclose(FILE *stream); -TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); +TSRM_API int tsrm_win32_access(const char *pathname, int mode); TSRM_API int win32_utime(const char *filename, struct utimbuf *buf); TSRM_API int shmget(int key, int size, int flags); |