summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-07-02 15:12:34 +0000
committerAndi Gutmans <andi@php.net>2000-07-02 15:12:34 +0000
commitb9037f7d691bf1a88d6aaf708d3babb28836c468 (patch)
tree7c75c6d3f5c9c53b4dfc59f2c63c00e48c66fb40
parent0249137148921d463d9c79c89592db914dfbb642 (diff)
downloadphp-git-b9037f7d691bf1a88d6aaf708d3babb28836c468.tar.gz
- Make PHP compile again under Windows.
- Please be careful when you make such changes.
-rw-r--r--ext/odbc/php_odbc.c2
-rw-r--r--ext/standard/basic_functions.c1
-rw-r--r--ext/standard/file.c34
-rw-r--r--ext/standard/file.h1
-rw-r--r--ext/standard/link.c28
-rw-r--r--ext/standard/php_link.h1
6 files changed, 34 insertions, 33 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 4cde406772..5ea0a584ac 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1227,7 +1227,7 @@ PHP_FUNCTION(odbc_fetch_into)
}
/* }}} */
-#ifdef HAVE_SOLID || defined(HAVE_SOLID_35)
+#if defined(HAVE_SOLID) || defined(HAVE_SOLID_35)
PHP_FUNCTION(solid_fetch_prev)
{
odbc_result *result;
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index cde33a8bd6..1cda0abfe6 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -53,7 +53,6 @@
#include "php_globals.h"
#include "SAPI.h"
-
#ifdef ZTS
int basic_globals_id;
#else
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 99ae196904..e03e9db77d 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -27,6 +27,7 @@
#include "php_globals.h"
#include "ext/standard/flock_compat.h"
#include "ext/standard/exec.h"
+#include "ext/standard/php_filestat.h"
#include <stdio.h>
#include <stdlib.h>
@@ -1575,11 +1576,10 @@ PHP_FUNCTION(fpassthru)
zend_list_delete((*arg1)->value.lval);
RETURN_LONG(size);
}
-
/* }}} */
+
/* {{{ proto int rename(string old_name, string new_name)
Rename a file */
-
PHP_FUNCTION(rename)
{
pval **old_arg, **new_arg;
@@ -1609,8 +1609,38 @@ PHP_FUNCTION(rename)
RETVAL_TRUE;
}
+/* }}} */
+
+/* {{{ proto int unlink(string filename)
+ Delete a file */
+PHP_FUNCTION(unlink)
+{
+ pval **filename;
+ int ret;
+ PLS_FETCH();
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_string_ex(filename);
+
+ if (PG(safe_mode) && !php_checkuid((*filename)->value.str.val, NULL, 2)) {
+ RETURN_FALSE;
+ }
+
+ ret = V_UNLINK((*filename)->value.str.val);
+ if (ret == -1) {
+ php_error(E_WARNING, "Unlink failed (%s)", strerror(errno));
+ RETURN_FALSE;
+ }
+ /* Clear stat cache */
+ PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ RETURN_TRUE;
+}
/* }}} */
+
+
/* {{{ proto int ftruncate (int fp, int size)
Truncate file to 'size' length */
PHP_FUNCTION(ftruncate)
diff --git a/ext/standard/file.h b/ext/standard/file.h
index adf9d9b028..17757e8fc2 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -60,6 +60,7 @@ PHP_FUNCTION(fpassthru);
PHP_FUNCTION(readfile);
PHP_FUNCTION(umask);
PHP_FUNCTION(rename);
+PHP_FUNCTION(unlink);
PHP_FUNCTION(copy);
PHP_FUNCTION(file);
PHP_FUNCTION(set_socket_blocking); /* deprecated */
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 18cd67c1dc..f7dd9a1aeb 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -158,37 +158,9 @@ PHP_FUNCTION(link)
}
/* }}} */
-/* {{{ proto int unlink(string filename)
- Delete a file */
-PHP_FUNCTION(unlink)
-{
- pval **filename;
- int ret;
- PLS_FETCH();
-
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_string_ex(filename);
-
- if (PG(safe_mode) && !php_checkuid((*filename)->value.str.val, NULL, 2)) {
- RETURN_FALSE;
- }
-
- ret = V_UNLINK((*filename)->value.str.val);
- if (ret == -1) {
- php_error(E_WARNING, "Unlink failed (%s)", strerror(errno));
- RETURN_FALSE;
- }
- /* Clear stat cache */
- PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
- RETURN_TRUE;
-}
-/* }}} */
#endif
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h
index 8d6e113ac5..f8189e850f 100644
--- a/ext/standard/php_link.h
+++ b/ext/standard/php_link.h
@@ -35,7 +35,6 @@
#ifdef HAVE_SYMLINK
PHP_FUNCTION(link);
-PHP_FUNCTION(unlink);
PHP_FUNCTION(readlink);
PHP_FUNCTION(linkinfo);
PHP_FUNCTION(symlink);