summaryrefslogtreecommitdiff
path: root/src/os_timer.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
committertruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
commitb3bed1eda1001aa5cabe3df4f8686cc1f42bb2b8 (patch)
tree47bcbff81f8436d0eb4b71288672b2917abb4e8d /src/os_timer.cpp
parentc76c4bf6e9f7fe8e0537ec96a7cc00d5e7273502 (diff)
downloadopenttd-b3bed1eda1001aa5cabe3df4f8686cc1f42bb2b8.tar.xz
(svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal)
-Fix: put DEBUG lines under WINCE via a function designed for just that under WINCE
Diffstat (limited to 'src/os_timer.cpp')
-rw-r--r--src/os_timer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os_timer.cpp b/src/os_timer.cpp
index a28bb8982..ca0b279b4 100644
--- a/src/os_timer.cpp
+++ b/src/os_timer.cpp
@@ -8,7 +8,7 @@
/* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
* from external win64.asm because VS2005 does not support inline assembly */
-#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE)
+#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) && !defined(WINCE)
# if _MSC_VER >= 1400
#include <intrin.h>
uint64 _rdtsc()
@@ -71,6 +71,9 @@ uint64 _rdtsc()
/* In all other cases we have no support for rdtsc. No major issue,
* you just won't be able to profile your code with TIC()/TOC() */
#if !defined(RDTSC_AVAILABLE)
+/* MSVC (in case of WinCE) can't handle #warning */
+# if !defined(_MSC_VER)
#warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
+# endif
uint64 _rdtsc() {return 0;}
#endif