File: non-x86-and-kfreebsd

package info (click to toggle)
snap-aligner 2.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,648 kB
  • sloc: cpp: 41,013; ansic: 5,239; python: 227; makefile: 85; sh: 27
file content (25 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Uses more liberal CPP defines to add compatibility to kfreebsd &
non-x86 systems
Author: Michael R. Crusoe <crusoe@ucdavis.edu> and Aaron M. Ucko <ucko@debian.org>
--- a/SNAPLib/Compat.cpp
+++ b/SNAPLib/Compat.cpp
@@ -1293,7 +1293,7 @@ _int64 timeInMillis()
 _int64 timeInNanos()
 {
     timespec ts;
-#if defined(__linux__)
+#if defined(_POSIX_TIMERS)  &&  _POSIX_TIMERS > 0
     clock_gettime(CLOCK_REALTIME, &ts); // Works on Linux
 #elif defined(__MACH__)
     clock_serv_t cclock;
--- a/SNAPLib/Compat.h
+++ b/SNAPLib/Compat.h
@@ -77,7 +77,7 @@ int getpagesize();
 #include <sched.h>  // For sched_setaffinity
 #endif
 
-#ifndef __APPLE__
+#if defined(__SSE__)  &&  !defined(__APPLE__)
 #include <xmmintrin.h>  // This is currently (in Dec 2013) broken on Mac OS X 10.9 (Apple clang-500.2.79)
 #else
 #define _mm_prefetch(...) {}