summaryrefslogtreecommitdiff
path: root/ext/opcache/shared_alloc_win32.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-01-06 14:43:07 +0000
committerJakub Zelenka <bukka@php.net>2016-01-06 14:43:07 +0000
commitae0ce19fa86377e5ab230ab9dca8f8dbd9826fd7 (patch)
tree360c977fa1f03c2db397743988cd003e2321e44c /ext/opcache/shared_alloc_win32.c
parent55abb5d39501ca0fa9bc704198785b1f98c95bb2 (diff)
parent7302b72d6e6bb77446599ec29a3b89702a506025 (diff)
downloadphp-git-ae0ce19fa86377e5ab230ab9dca8f8dbd9826fd7.tar.gz
Merge branch 'master' into openssl_aead
Diffstat (limited to 'ext/opcache/shared_alloc_win32.c')
-rw-r--r--ext/opcache/shared_alloc_win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index ce4bacf348..a56546557c 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 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 |
@@ -76,18 +76,18 @@ static void zend_win_error_message(int type, char *msg, int err)
static char *create_name_with_username(char *name)
{
- static char newname[MAXPATHLEN + UNLEN + 4];
+ static char newname[MAXPATHLEN + UNLEN + 4 + 1 + 32];
char uname[UNLEN + 1];
DWORD unsize = UNLEN;
GetUserName(uname, &unsize);
- snprintf(newname, sizeof(newname) - 1, "%s@%s", name, uname);
+ snprintf(newname, sizeof(newname) - 1, "%s@%s@%.32s", name, uname, ZCG(system_id));
return newname;
}
static char *get_mmap_base_file(void)
{
- static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@")];
+ static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@") + 1 + 32];
char uname[UNLEN + 1];
DWORD unsize = UNLEN;
int l;
@@ -95,7 +95,7 @@ static char *get_mmap_base_file(void)
GetTempPath(MAXPATHLEN, windir);
GetUserName(uname, &unsize);
l = strlen(windir);
- snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname);
+ snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
return windir;
}