]> granicus.if.org Git - php/commitdiff
MFH (symlinks + ZTS).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 15 Nov 2002 16:34:54 +0000 (16:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 15 Nov 2002 16:34:54 +0000 (16:34 +0000)
ext/standard/link.c

index 0d1aabfdcd97ac1826573fb758b3eb352103dbc8..0730c4f9b6127d4a4a042231559d1d3b829bcc17 100644 (file)
@@ -146,7 +146,11 @@ PHP_FUNCTION(symlink)
                RETURN_FALSE;
        }
 
+#ifndef ZTS
        ret = symlink(Z_STRVAL_PP(topath), Z_STRVAL_PP(frompath));
+#else 
+       ret = symlink(dest_p, source_p);
+#endif 
        if (ret == -1) {
                php_error(E_WARNING, "Symlink failed (%s)", strerror(errno));
                RETURN_FALSE;
@@ -197,7 +201,11 @@ PHP_FUNCTION(link)
                RETURN_FALSE;
        }
 
+#ifndef ZTS
        ret = link(Z_STRVAL_PP(topath), Z_STRVAL_PP(frompath));
+#else 
+       ret = link(dest_p, source_p);   
+#endif 
        if (ret == -1) {
                php_error(E_WARNING, "Link failed (%s)", strerror(errno));
                RETURN_FALSE;