--- embedaddon/php/ext/standard/link_win32.c 2012/02/21 23:48:02 1.1.1.1 +++ embedaddon/php/ext/standard/link_win32.c 2013/07/22 01:32:05 1.1.1.3 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link_win32.c,v 1.1.1.1 2012/02/21 23:48:02 misho Exp $ */ +/* $Id: link_win32.c,v 1.1.1.3 2013/07/22 01:32:05 misho Exp $ */ #ifdef PHP_WIN32 #include "php.h" @@ -39,7 +39,6 @@ #include #include -#include "safe_mode.h" #include "php_link.h" #include "php_string.h" @@ -51,6 +50,14 @@ TODO: - this file is then useless and we have a portable link API */ +#ifndef VOLUME_NAME_NT +#define VOLUME_NAME_NT 0x2 +#endif + +#ifndef VOLUME_NAME_DOS +#define VOLUME_NAME_DOS 0x0 +#endif + /* {{{ proto string readlink(string filename) Return the target of a symbolic link */ PHP_FUNCTION(readlink) @@ -59,7 +66,7 @@ PHP_FUNCTION(readlink) int link_len; char target[MAXPATHLEN]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &link, &link_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &link, &link_len) == FAILURE) { return; } @@ -84,7 +91,7 @@ PHP_FUNCTION(linkinfo) struct stat sb; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &link, &link_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &link, &link_len) == FAILURE) { return; } @@ -127,7 +134,7 @@ PHP_FUNCTION(symlink) RETURN_FALSE; } - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) { return; }