com php-src: Merge branch 'PHP-7.1' into PHP-7.2: win32/ftok.c
| From: | Anatol Belski | Date: | Mon, 09 Oct 2017 11:13:51 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.1' into PHP-7.2: win32/ftok.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99662@lists.php.net to get a copy of this message | ||
Commit: a51c542b5305dbcb62279db57025ec7f1f1774db
Author: Anatol Belski <ab@php.net> Mon, 9 Oct 2017 13:13:51 +0200
Parents: 1db7e4a962782462e692f705ba6125dedfad87d5 dc3b9fe619ca36ddb1f1948c66fc09a500dedc2f
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a51c542b5305dbcb62279db57025ec7f1f1774db
Log:
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fix ftok() multibyte path support
Changed paths:
MM win32/ftok.c
Diff:
diff --cc win32/ftok.c
index dd68c2e,64c430b..b88ed00
--- a/win32/ftok.c
+++ b/win32/ftok.c
@@@ -21,16 -21,18 +21,18 @@@
#include <windows.h>
#include <sys/stat.h>
+ #include "ioutil.h"
-PHPAPI key_t
+PHP_WIN32_IPC_API key_t
ftok(const char *pathname, int proj_id)
-{
+{/*{{{*/
HANDLE fh;
- struct stat st;
+ struct _stat st;
BY_HANDLE_FILE_INFORMATION bhfi;
key_t ret;
+ PHP_WIN32_IOUTIL_INIT_W(pathname)
- if (stat(pathname, &st) < 0) {
+ if (!pathw) {
return (key_t)-1;
}
@@@ -46,15 -55,8 +55,16 @@@
ret = (key_t) ((proj_id & 0xff) << 24 | (st.st_dev & 0xff) << 16 |
((bhfi.nFileIndexLow | (__int64)bhfi.nFileIndexHigh << 32) & 0xffff));
CloseHandle(fh);
+ PHP_WIN32_IOUTIL_CLEANUP_W()
return ret;
-}
+}/*}}}*/
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */