Przeglądaj źródła

cmThread.c : Changed OS_64 cond. compilation to OS_VER_10_6. This needs

more work to fix correctly.
master
kevin 11 lat temu
rodzic
commit
11b11347a0
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5
    3
      cmThread.c

+ 5
- 3
cmThread.c Wyświetl plik

@@ -1290,6 +1290,8 @@ bool     cmThFloatCAS( float*    addr, float    old, float    new )
1290 1290
 #endif
1291 1291
 }
1292 1292
 
1293
+#define OS_VER_10_6
1294
+
1293 1295
 bool     cmThPtrCAS(   void*    addr, void*    old, void*    neww )
1294 1296
 {
1295 1297
 #ifdef OS_OSX
@@ -1302,7 +1304,7 @@ bool     cmThPtrCAS(   void*    addr, void*    old, void*    neww )
1302 1304
     union 
1303 1305
     {
1304 1306
       void* addr;
1305
-#ifdef OS_64
1307
+#ifdef OS_VER_10_6
1306 1308
       int64_t   val;
1307 1309
 #else
1308 1310
       int val;
@@ -1314,7 +1316,7 @@ bool     cmThPtrCAS(   void*    addr, void*    old, void*    neww )
1314 1316
   
1315 1317
   ov.u.addr = old;
1316 1318
   nv.u.addr = neww;
1317
-#ifdef OS_64
1319
+#ifdef OS_VER_10_6
1318 1320
   int rv = OSAtomicCompareAndSwap64Barrier(ov.u.val,nv.u.val,(int64_t*)addr);
1319 1321
 #else
1320 1322
   int rv = OSAtomicCompareAndSwap32Barrier(ov.u.val,nv.u.val,(int*)addr);
@@ -1323,7 +1325,7 @@ bool     cmThPtrCAS(   void*    addr, void*    old, void*    neww )
1323 1325
 #endif
1324 1326
 
1325 1327
 #ifdef OS_LINUX
1326
-#ifdef OS_64
1328
+#ifdef OS_VER_10_6
1327 1329
   return  __sync_bool_compare_and_swap((long long*)addr, (long long)old, (long long)neww); 
1328 1330
 #else
1329 1331
   return  __sync_bool_compare_and_swap((int*)addr,(int)old,(int)neww); 

Ładowanie…
Anuluj
Zapisz