cvs: php4(PHP_4_3) /ext/standard link.c
| From: | Ilia Alshanetsky | Date: | Fri, 15 Nov 2002 16:34:54 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/standard link.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16297@lists.php.net to get a copy of this message | ||
iliaa Fri Nov 15 11:34:54 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard link.c
Log:
MFH (symlinks + ZTS).
Index: php4/ext/standard/link.c
diff -u php4/ext/standard/link.c:1.42.2.1 php4/ext/standard/link.c:1.42.2.2
--- php4/ext/standard/link.c:1.42.2.1 Thu Nov 14 11:21:15 2002
+++ php4/ext/standard/link.c Fri Nov 15 11:34:54 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: link.c,v 1.42.2.1 2002/11/14 16:21:15 iliaa Exp $ */
+/* $Id: link.c,v 1.42.2.2 2002/11/15 16:34:54 iliaa Exp $ */
#include "php.h"
#include "php_filestat.h"
@@ -146,7 +146,11 @@
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 @@
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;