summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-07-23 23:21:17 +0200
committerAnatol Belski <ab@php.net>2016-07-23 23:24:32 +0200
commit88d4f149a653e8a4eb754d08eb8c68bfd5973226 (patch)
tree0d8d09f61bd2f31cdcd4af87693f32cac73e95b6 /win32
parent40557fdc346bde45dc912ae8ebe4bd7f3ff9d469 (diff)
downloadphp-git-88d4f149a653e8a4eb754d08eb8c68bfd5973226.tar.gz
improve typedef and fix the fake function
Diffstat (limited to 'win32')
-rw-r--r--win32/ioutil.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/ioutil.c b/win32/ioutil.c
index 69cc5e2051..57a1daf72a 100644
--- a/win32/ioutil.c
+++ b/win32/ioutil.c
@@ -66,7 +66,7 @@
#include <winnls.h>
*/
-typedef HRESULT (WINAPI *MyPathCchCanonicalizeEx)(_Out_ PWSTR pszPathOut, _In_ size_t cchPathOut, _In_ PCWSTR pszPathIn, _In_ unsigned long dwFlags);
+typedef HRESULT (WINAPI *MyPathCchCanonicalizeEx)(wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags);
static MyPathCchCanonicalizeEx canonicalize_path_w = NULL;
@@ -539,10 +539,10 @@ PW32IO BOOL php_win32_ioutil_normalize_path_w(wchar_t **buf, size_t len, size_t
return TRUE;
}/*}}}*/
-static HRESULT MyPathCchCanonicalizeExFallback(_Out_ PWSTR pszPathOut, _In_ size_t cchPathOut, _In_ PCWSTR pszPathIn, _In_ unsigned long dwFlags)
+static HRESULT MyPathCchCanonicalizeExFallback(wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags)
{
- pszPathOut = pszPathIn;
- cchPathOut = wcslen(pszPathOut);
+ cchPathOut = wcslen(pszPathIn);
+ memmove(pszPathOut, pszPathIn, (cchPathOut + 1) * sizeof(wchar_t));
return S_OK;
}