diff options
| author | Andi Gutmans <andi@php.net> | 2000-05-23 14:36:27 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2000-05-23 14:36:27 +0000 |
| commit | 521f03c184fad08cc6943decd53df29f4a3ed830 (patch) | |
| tree | 5e8f40e3843a91dc461b2e329d67ede4ac12252e /ext | |
| parent | 0eb51100b77996efbf0a728efe55ded996814025 (diff) | |
| download | php-git-521f03c184fad08cc6943decd53df29f4a3ed830.tar.gz | |
- Support virtual unlink()
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/db/db.c | 4 | ||||
| -rw-r--r-- | ext/session/mod_files.c | 4 | ||||
| -rw-r--r-- | ext/standard/file.c | 2 | ||||
| -rw-r--r-- | ext/standard/link.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/ext/db/db.c b/ext/db/db.c index 07cdefc5ba..ed64c9c14a 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -399,7 +399,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) { #if NFS_HACK if (lockfn) { - unlink(lockfn); + V_UNLINK(lockfn); } #endif if (lockfn) efree(lockfn); @@ -434,7 +434,7 @@ int php_dbm_close(dbm_info *info) { dbf = info->dbf; #if NFS_HACK - unlink(info->lockfn); + V_UNLINK(info->lockfn); #else if (info->lockfn) { lockfd = V_OPEN((info->lockfn,O_RDWR,0644)); diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index c3fc91bb3f..aefebc1df5 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -178,7 +178,7 @@ static int _ps_files_cleanup_dir(const char *dirname, int maxlifetime) V_STAT(buf, &sbuf) == 0 && /* is it expired? */ (now - sbuf.st_atime) > maxlifetime) { - unlink(buf); + V_UNLINK(buf); nrdels++; } } @@ -276,7 +276,7 @@ PS_DESTROY_FUNC(files) if (!_ps_files_path_create(buf, sizeof(buf), data, key)) return FAILURE; - unlink(buf); + V_UNLINK(buf); return SUCCESS; } diff --git a/ext/standard/file.c b/ext/standard/file.c index 9c42e108f9..57569e73b0 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -231,7 +231,7 @@ static void _file_socket_dtor(int *sock) static void _file_upload_dtor(char *file) { - unlink(file); + V_UNLINK(file); } diff --git a/ext/standard/link.c b/ext/standard/link.c index ffe14235ef..2fb126afa3 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -181,7 +181,7 @@ PHP_FUNCTION(unlink) RETURN_FALSE; } - ret = unlink((*filename)->value.str.val); + ret = V_UNLINK((*filename)->value.str.val); if (ret == -1) { php_error(E_WARNING, "Unlink failed (%s)", strerror(errno)); RETURN_FALSE; |
