Changeset 83 for branches/1.0/mmap.c
- Timestamp:
- 06/18/2006 01:27:30 AM (2 years ago)
- Files:
-
- 1 modified
-
branches/1.0/mmap.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/mmap.c
r80 r83 12 12 # define ftruncate chsize 13 13 # define getuid() 0 14 # include <process.h> 14 15 # define XCacheCreateFileMapping(size, perm, name) \ 15 16 CreateFileMapping(INVALID_HANDLE_VALUE, NULL, perm, (sizeof(xc_shmsize_t) > 4) ? size >> 32 : 0, size & 0xffffffff, name) … … 157 158 if (path == NULL || !path[0]) { 158 159 static int inc = 0; 159 snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d ", TMP_PATH, (int) getuid(), inc ++, rand());160 snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d.%d", TMP_PATH, (int) getuid(), (int) getpid(), inc ++, rand()); 160 161 path = tmpname; 161 162 } 163 #ifdef ZEND_WIN32 164 else { 165 static int inc2 = 0; 166 snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d.%d", path, (int) getuid(), (int) getpid(), inc2 ++, rand()); 167 path = tmpname; 168 } 169 #endif 162 170 163 171 shm->name = strdup(path);

