Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
(try to) Unify detection of windows. _WIN32 may not be defined for 64 bits systems
authordegomme <augustin.degomme@unibas.ch>
Fri, 5 Feb 2016 14:58:59 +0000 (15:58 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Fri, 5 Feb 2016 14:59:13 +0000 (15:59 +0100)
src/simix/RawContext.cpp
src/simix/smx_context.cpp
src/xbt/xbt_main.c

index c4f00e7..9cbb2df 100644 (file)
@@ -128,7 +128,7 @@ __asm__ (
    ".text\n"
    ".globl _raw_makecontext\n"
    "_raw_makecontext:\n"
-#elif defined(_WIN32)
+#elif defined(_XBT_WIN32)
    ".text\n"
    ".globl raw_makecontext\n"
    "raw_makecontext:\n"
@@ -164,7 +164,7 @@ __asm__ (
    ".text\n"
    ".globl _raw_swapcontext\n"
    "_raw_swapcontext:\n"
-#elif defined(_WIN32)
+#elif defined(_XBT_WIN32)
    ".text\n"
    ".globl raw_swapcontext\n"
    "raw_swapcontext:\n"
@@ -204,7 +204,7 @@ __asm__ (
 );
 #elif PROCESSOR_i686
 __asm__ (
-#if defined(APPLE) || defined(_WIN32)
+#if defined(APPLE) || defined(_XBT_WIN32)
    ".text\n"
    ".globl _raw_makecontext\n"
    "_raw_makecontext:\n"
@@ -231,7 +231,7 @@ __asm__ (
 );
 
 __asm__ (
-#if defined(APPLE) || defined(_WIN32)
+#if defined(APPLE) || defined(_XBT_WIN32)
    ".text\n"
    ".globl _raw_swapcontext\n"
    "_raw_swapcontext:\n"
index d630035..a07051b 100644 (file)
@@ -17,7 +17,7 @@
 #include "simgrid/modelchecker.h"
 
 
-#ifdef _WIN32
+#ifdef _XBT_WIN32
 #include <windows.h>
 #include <malloc.h>
 #else
index 9c718df..7c6795f 100644 (file)
@@ -90,7 +90,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
 
 static void xbt_preinit(void) {
   unsigned int seed = 2147483647;
-#ifndef WIN32
+#ifndef _XBT_WIN32
   xbt_pagesize = sysconf(_SC_PAGESIZE);
 #else
   SYSTEM_INFO si;
@@ -115,7 +115,7 @@ static void xbt_preinit(void) {
   xbt_dict_preinit();
    
   srand(seed);
-#ifndef _WIN32
+#ifndef _XBT_WIN32
   srand48(seed);
 #endif
   atexit(xbt_postexit);