cvs: php4 /ext/standard basic_functions.c filestat.c php_filestat.h
| From: | Derick Rethans | Date: | Wed, 03 Jul 2002 06:45:02 +0000 |
| Subject: | cvs: php4 /ext/standard basic_functions.c filestat.c php_filestat.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12681@lists.php.net to get a copy of this message | ||
derick Wed Jul 3 02:45:02 2002 EDT
Modified files:
/php4/ext/standard filestat.c basic_functions.c php_filestat.h
Log:
- Fix windows build
#- I could not test this, please try!
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.96 php4/ext/standard/filestat.c:1.97
--- php4/ext/standard/filestat.c:1.96 Tue Jul 2 23:18:55 2002
+++ php4/ext/standard/filestat.c Wed Jul 3 02:45:01 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.96 2002/07/03 03:18:55 sniper Exp $ */
+/* $Id: filestat.c,v 1.97 2002/07/03 06:45:01 derick Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -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 @@
}
/* }}} */
+#ifndef PHP_WIN32
/* {{{ proto bool is_executable(string filename)
Returns true if file is executable */
PHP_FUNCTION(is_executable)
@@ -845,6 +852,7 @@
RETURN_BOOL(!access (filename, X_OK));
}
/* }}} */
+#endif
/* {{{ proto bool is_file(string filename)
Returns true if file is a regular file */
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.482 php4/ext/standard/basic_functions.c:1.483
--- php4/ext/standard/basic_functions.c:1.482 Mon Jun 24 15:36:25 2002
+++ php4/ext/standard/basic_functions.c Wed Jul 3 02:45:01 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.482 2002/06/24 19:36:25 helly Exp $ */
+/* $Id: basic_functions.c,v 1.483 2002/07/03 06:45:01 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -674,7 +674,9 @@
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)
Index: php4/ext/standard/php_filestat.h
diff -u php4/ext/standard/php_filestat.h:1.16 php4/ext/standard/php_filestat.h:1.17
--- php4/ext/standard/php_filestat.h:1.16 Fri Apr 26 19:46:51 2002
+++ php4/ext/standard/php_filestat.h Wed Jul 3 02:45:01 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_filestat.h,v 1.16 2002/04/26 23:46:51 yohgaki Exp $ */
+/* $Id: php_filestat.h,v 1.17 2002/07/03 06:45:01 derick Exp $ */
#ifndef PHP_FILESTAT_H
#define PHP_FILESTAT_H
@@ -36,7 +36,9 @@
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);