1. Pypy
  2. Untitled project
  3. pypy

Commits

Amaury Forgeot d'Arc  committed 330d1a3

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

  • Participants
  • Parent commits 8030f30
  • Branches default

Comments (0)

Files changed (2)

File pypy/translator/c/src/debug.h

View file
  • Ignore whitespace
 /* 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>

File pypy/translator/c/src/instrument.h

View file
  • Ignore whitespace
 #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) {