[pypy-svn] r69759 - pypy/trunk/pypy/translator/c/src

afa at codespeak.net afa at codespeak.net
Mon Nov 30 12:10:35 CET 2009


Author: afa
Date: Mon Nov 30 12:10:35 2009
New Revision: 69759

Modified:
   pypy/trunk/pypy/translator/c/src/debug.h
   pypy/trunk/pypy/translator/c/src/instrument.h
Log:
WIN32 is not defined on all windows compilers. Use #ifdef _WIN32 instead.


Modified: pypy/trunk/pypy/translator/c/src/debug.h
==============================================================================
--- pypy/trunk/pypy/translator/c/src/debug.h	(original)
+++ pypy/trunk/pypy/translator/c/src/debug.h	Mon Nov 30 12:10:35 2009
@@ -115,7 +115,7 @@
 /* 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>

Modified: pypy/trunk/pypy/translator/c/src/instrument.h
==============================================================================
--- pypy/trunk/pypy/translator/c/src/instrument.h	(original)
+++ pypy/trunk/pypy/translator/c/src/instrument.h	Mon Nov 30 12:10:35 2009
@@ -9,7 +9,7 @@
 #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>
@@ -26,7 +26,7 @@
 	char *fname = getenv("_INSTRUMENT_COUNTERS");
 	if (fname) {
 		int fd;
-#ifdef WIN32
+#ifdef _WIN32
         HANDLE map_handle;
         HANDLE file_handle;
 #endif
@@ -36,7 +36,7 @@
 		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) {



More information about the Pypy-commit mailing list