]> granicus.if.org Git - php/commitdiff
- Make PHP compile again under Windows.
authorAndi Gutmans <andi@php.net>
Sun, 2 Jul 2000 15:12:34 +0000 (15:12 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 2 Jul 2000 15:12:34 +0000 (15:12 +0000)
- Please be careful when you make such changes.

ext/odbc/php_odbc.c
ext/standard/basic_functions.c
ext/standard/file.c
ext/standard/file.h
ext/standard/link.c
ext/standard/php_link.h

index 4cde406772145458cadc81f7d314176d91710f63..5ea0a584ac8b66bd3d2b700d5c9f4a36f8a3e144 100644 (file)
@@ -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;
index cde33a8bd60d0410e3c6f930cc6759c6bcad4f83..1cda0abfe6e4b232b10dad398a422bd4a1ca9527 100644 (file)
@@ -53,7 +53,6 @@
 #include "php_globals.h"
 #include "SAPI.h"
 
-
 #ifdef ZTS
 int basic_globals_id;
 #else
index 99ae1969041e0f19c2dcc16365145ea68d4d1f45..e03e9db77d2f168cbbbc22a1674116c279550043 100644 (file)
@@ -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)
index adf9d9b028f82afa491d308c775a3b5e5cd30c7d..17757e8fc2599c7844efac6f6129f1bb1831562f 100644 (file)
@@ -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 */
index 18cd67c1dc7243d2ea94f0da25bc15e223451808..f7dd9a1aeb94eb5aad1878a97b0c1759d54cc38f 100644 (file)
@@ -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
index 8d6e113ac57196d6e912ea13fbab59b11a360c0f..f8189e850ffb646330118e679218cb339f5035f3 100644 (file)
@@ -35,7 +35,6 @@
 #ifdef HAVE_SYMLINK
 
 PHP_FUNCTION(link);
-PHP_FUNCTION(unlink);
 PHP_FUNCTION(readlink);
 PHP_FUNCTION(linkinfo);
 PHP_FUNCTION(symlink);