Commits

Amaury Forgeot d'Arc committed 330d1a3

WIN32 is not defined on all windows compilers. Use #ifdef _WIN32 instead.

Comments (0)

Files changed (2)

pypy/translator/c/src/debug.h

 /* asm_xxx.h may contain a specific implementation of READ_TIMESTAMP.
  * This is the default generic timestamp implementation.
  */
-#  ifdef WIN32
+#  ifdef _WIN32
 #    define READ_TIMESTAMP(val)  QueryPerformanceCounter(&(val))
 #  else
 #    include <time.h>

pypy/translator/c/src/instrument.h

 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#ifndef WIN32
+#ifndef _WIN32
 #include <sys/mman.h>
 #include <stdlib.h>
 #include <stdio.h>
 	char *fname = getenv("_INSTRUMENT_COUNTERS");
 	if (fname) {
 		int fd;
-#ifdef WIN32
+#ifdef _WIN32
         HANDLE map_handle;
         HANDLE file_handle;
 #endif
 		if (sz > 0) {
 			lseek(fd, sz-1, SEEK_SET);
 			write(fd, "", 1);
-#ifndef WIN32
+#ifndef _WIN32
 			buf = mmap(NULL, sz, PROT_WRITE|PROT_READ, MAP_SHARED,
 				   fd, 0);
 			if (buf == MAP_FAILED) {