diff options
author | Derick Rethans <derick@php.net> | 2002-07-03 06:45:01 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2002-07-03 06:45:01 +0000 |
commit | c73733c59acef49b86af5996cb0ec12b970a7759 (patch) | |
tree | 8515c27325c786f763c6b240dceaf8f08cf4df54 | |
parent | 47b5b8da58c3f8a8d24f97dd54f8233cb3173f79 (diff) | |
download | php-git-c73733c59acef49b86af5996cb0ec12b970a7759.tar.gz |
- Fix windows build
#- I could not test this, please try!
-rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
-rw-r--r-- | ext/standard/filestat.c | 8 | ||||
-rw-r--r-- | ext/standard/php_filestat.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 59c9a9f730..54d87b5ebe 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -674,7 +674,9 @@ function_entry basic_functions[] = { PHP_FE(is_writable, NULL) PHP_FALIAS(is_writeable, is_writable, NULL) PHP_FE(is_readable, NULL) +#ifndef PHP_WIN32 PHP_FE(is_executable, NULL) +#endif PHP_FE(is_file, NULL) PHP_FE(is_dir, NULL) PHP_FE(is_link, NULL) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index bc92f9fd00..e7e0ec8f8f 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -110,6 +110,12 @@ #define FS_LSTAT 16 #define FS_STAT 17 +/* From: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt__access.2c_._waccess.asp */ +#ifdef PHP_WIN32 +#define F_OK 0 +#define W_OK 2 +#define R_OK 4 +#endif PHP_RINIT_FUNCTION(filestat) { @@ -831,6 +837,7 @@ PHP_FUNCTION(is_readable) } /* }}} */ +#ifndef PHP_WIN32 /* {{{ proto bool is_executable(string filename) Returns true if file is executable */ PHP_FUNCTION(is_executable) @@ -845,6 +852,7 @@ PHP_FUNCTION(is_executable) RETURN_BOOL(!access (filename, X_OK)); } /* }}} */ +#endif /* {{{ proto bool is_file(string filename) Returns true if file is a regular file */ diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 62cd4f57b9..a801f6adeb 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -36,7 +36,9 @@ PHP_FUNCTION(filesize); PHP_FUNCTION(filetype); PHP_FUNCTION(is_writable); PHP_FUNCTION(is_readable); +#ifndef PHP_WIN32 PHP_FUNCTION(is_executable); +#endif PHP_FUNCTION(is_file); PHP_FUNCTION(is_dir); PHP_FUNCTION(is_link); |