Index: trunk/mmap.c
===================================================================
--- trunk/mmap.c	(revision 768)
+++ trunk/mmap.c	(revision 924)
@@ -45,10 +45,11 @@
 	long  diff;
 	xc_shmsize_t size;
+	xc_shmsize_t memoffset;
 	char *name;
-	int newfile;
-	xc_shmsize_t memoffset;
 #ifdef ZEND_WIN32
 	HANDLE hmap;
 	HANDLE hmap_ro;
+#else
+	int newfile;
 #endif
 };
@@ -120,8 +121,10 @@
 
 	if (shm->name) {
-#ifdef __CYGWIN__
+#ifndef ZEND_WIN32
+#	ifdef __CYGWIN__
 		if (shm->newfile) {
 			unlink(shm->name);
 		}
+#	endif
 #endif
 		free(shm->name);
@@ -142,7 +145,7 @@
 #else
 #	define TMP_PATH "/tmp/XCache"
+	int fd = -1;
 #endif
 	xc_shm_t *shm = NULL;
-	int fd = -1;
 	int ro_ok;
 	volatile void *romem;
@@ -260,9 +263,12 @@
 	/* }}} */
 
+#ifndef ZEND_WIN32
 	close(fd);
-#ifndef __CYGWIN__
+
+#	ifndef __CYGWIN__
 	if (shm->newfile) {
 		unlink(shm->name);
 	}
+#	endif
 #endif
 
@@ -270,7 +276,9 @@
 
 err:
+#ifndef ZEND_WIN32
 	if (fd != -1) {
 		close(fd);
 	}
+#endif
 	if (shm) {
 		xc_mmap_destroy(shm);
